chore: configure eslint#123
Conversation
|
@mayorovad I think you should use the prettier plugin for eslint and remove all formatting rules from eslint because afaik we Prettier is used in this project to format the code. To be honest, I am not sure if prettier is enforced right now, but if it isn't, it probably should be. That would make the Eslint config a lot easier as well. |
| "@typescript-eslint/no-explicit-any": "off", | ||
| "@typescript-eslint/ban-ts-comment": "off", | ||
| "@typescript-eslint/ban-types": "off", | ||
| "@typescript-eslint/no-unused-vars": "off" |
There was a problem hiding this comment.
Yeah, need to remove them after solving all unnecessary conditions warnings.
| { | ||
| "compilerOptions": { | ||
| "module": "ES2020", | ||
| "lib": ["dom", "es5"], |
There was a problem hiding this comment.
Shouldn't that lib be es2020?
| "lib": ["dom", "es5"], | |
| "lib": ["dom", "es2020"], |
There was a problem hiding this comment.
I think best is es6, because es2020 features currently not used in this code and es5 may lead to some excessive code when transpiling to es6 and higher.
|
I'm sorry, this edits is beyond the scope of PR, but it is what it is 😸. Edited base |
@Kurt29 Prettier is not enforced but we would like because formatting issues are regularly introduced (for instance, see #88 (review) or #77) @mayorovad are we forced to change the TypeScript configuration as part of this PR? I can review the eslint configuration but I don't have time for now to check the impact of changing the transpile configuration (what you propose seems ok but I would like more time to discuss with other people of this change) |
|
@tbouffard I checked, with current set of rules in |
tbouffard
left a comment
There was a problem hiding this comment.
Thanks @mayorovad for this PR, this is a great step forward. I am pretty sure that with the upcoming work that will fix all eslint/prettier issue, it will help new contributors.
About the tsconfig change you reverted, I think it is something we should implement so if you have time, feel free to create a new PR about it. I will review it quickly 😄
Summary
Added
eslintto project and configured it (#122).Need feedback on code-styling rules like
comma-dangleandindent. If everyting is seems fine, I can follow up with auto-fixed problems commit.Description for the changelog
Added
eslint