-
Notifications
You must be signed in to change notification settings - Fork 235
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
Add ESLint to project #367
Conversation
Note the |
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.
You missed the most important bit: adding eslint to .pre-commit-config.yaml so it runs during linting.
If you do this you do not need to alter any github actions.
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.
Almost every var
can be changed to const
.
Add this rule: https://eslint.org/docs/rules/prefer-const
And it should help you out.
Let me take some time today and read over the rule list to see what else we may want to add |
Good point @ssbarnea, thank you for pointing this out. I've updated the PR accordingly |
@BeyondEvil @ssbarnea I've gone through the rule list and added every rule I thought made sense that didn't involve sweeping changes ( I'd feel safer adding those in a follow up PR to avoid breaking things ) except for the following sections: From the rest of the rule list, I intentionally skipped the following rules since they involved making a refactor, which I want to address in a follow up PR to decrease the size of this one:
If we are happy with this PR, I'd like to raise the above as separate issues after this merges so we don't forget about them and add them in time permitting. |
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! 🎉
But let's wait for @ssbarnea before merging.
Add ESLint for JS linting.
This better sets us up to tackle #350, and should be added in as a best practice regardless.
The
.eslintrc.json
file was auto-generated byESLint
.