Migrate from the deprecated TSLint to Angluar ESLint
Description
TSLint was deprecated by its creators in 2019. This PR replaces Codelyzer and TSLint with Angular ESLint, as recommended in the deprecation notice.
I followed the steps in Migrating from TSLint: Current Status as of angular-eslint v16 to migrate.
To resolve linting errors, I made the following code fixes:
- To fix
@angular-eslint/template/eqeqeq, I replaced==and!=operators with===and!==respectively, after verifying each occurrence to make sure that there would be no functional impact. - To fix
@angular-eslint/no-empty-lifecycle-method(Lifecycle methods should not be empty), I removed all empty lifecycle methods (mostlyngOnInit). - To fix
@angular-eslint/no-output-native(Output bindings, including aliases, should not be named as standard DOM events), I renamed@Output() submitto@Output() submitEvent. - To fix
@angular-eslint/template/no-negated-async(Async pipe results should not be negated), I changed!(isHandset$ | async)to(isHandset$ | async) === falseinshell.component.html.
After the above fixes, npx ng lint runs without issues.
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
-
[x] If you have multiple commits please combine them into one commit by squashing them.
-
[x] Read and understood the contribution guidelines at
web-app/.github/CONTRIBUTING.md.
This is my first PR on the project so I hope I did everything right. Is there anybody who could review this, and let me know if there's anything I need to do or change? Perhaps @alberto-art3ch?
@PC-11-00 @alberto-art3ch @janez89 @somasorosdpc is anybody able to review this PR please? I realize it touches a lot of files but the changes are all pretty minor. If somebody has a better approach to get rid of this deprecated dependency I'm open to suggestions!
@rhopman I am sorry to be slow on this PR. Can you please resolve the conflicts and we can give a try to review it
Thanks, @adamsaghy! I've resolved the merge conflicts. Please let me know if there's anything else I can do to assist in the process.
@alberto-art3ch Please help me to review this PR.
@rhopman Please kindly check the failing lint validation:
Linting "mifosx-web-app"...
/home/runner/work/web-app/web-app/src/app/loans/loans-view/account-details/account-details.component.html
Error: 14:26 error Expected `===` but received `==` @angular-eslint/template/eqeqeq
Lint errors found in the listed files.
Error: 14:73 error Expected `!==` but received `!=` @angular-eslint/template/eqeqeq
Error: 14:126 error Expected `!==` but received `!=` @angular-eslint/template/eqeqeq
✖ 3 problems (3 errors, 0 warnings)
Linting "mifosx-web-app-e2e"...
All files pass linting.
Error: Process completed with exit code 1.
Apologies @adamsaghy, the linting issue should be fixed now.