-
Notifications
You must be signed in to change notification settings - Fork 551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate from the deprecated TSLint to Angluar ESLint #2175
Conversation
522f6d6
to
12365f7
Compare
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 |
12365f7
to
f074cb3
Compare
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:
|
Migrate from the deprecated TSLint to Angluar ESLint. Also fix current linting issues in the code, in particular: - Use strict equals operators (=== and !==) - Remove empty lifecycle methods (mostly ngOnInit) - Output bindings including aliases should not be named as standard dom events (submit) - Async pipe results should not be negated
f074cb3
to
4f815bb
Compare
Apologies @adamsaghy, the linting issue should be fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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:
@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.@angular-eslint/no-empty-lifecycle-method
(Lifecycle methods should not be empty), I removed all empty lifecycle methods (mostlyngOnInit
).@angular-eslint/no-output-native
(Output bindings, including aliases, should not be named as standard DOM events), I renamed@Output() submit
to@Output() submitEvent
.@angular-eslint/template/no-negated-async
(Async pipe results should not be negated), I changed!(isHandset$ | async)
to(isHandset$ | async) === false
inshell.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!
If you have multiple commits please combine them into one commit by squashing them.
Read and understood the contribution guidelines at
web-app/.github/CONTRIBUTING.md
.