Skip to content
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

Love the use of eslint #46

Open
ivan-unfolds opened this issue Jan 19, 2023 · 1 comment
Open

Love the use of eslint #46

ivan-unfolds opened this issue Jan 19, 2023 · 1 comment

Comments

@ivan-unfolds
Copy link

You could also add a script in the package.json so that it's easier to check, something like:

"lint": "eslint ."

You could then run this script before pushing up to make sure your codebase is following all the rules.

Or even better you could use a tool like husky to add a git hook which will stop you pushing up to Github if there are errors. Another way to do this would be to add a Github action that would prevent anyone from merging to main if there are any errors.

This would have prevented something like the following line where you have a variable that's not being used

const { sanitize, validate } = require('./validate');

@nataliarusu
Copy link
Collaborator

Thank you, Ivan.
It was fixed yesterday on the other branch which we planned to merge today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants