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

Updated according to lint rules #683

Closed
wants to merge 7 commits into from

Conversation

Gramatus
Copy link
Contributor

This PR makes two changes to .eslintrc.json and then updates the remaining code to follow the current linting rules.

These are the changes that are not pure updates to follow linting standards:

  1. Change parserOptions.ecmaVersion from 12 to 13. This is due to code in this project that fails the lint test in ecma 12.
  2. Change from ignoring test/**/*.js to overriding the env to jest for these files. By doing this we can get linter hints in the editor without the linter failing.

All other changes are either done by running npx standard --fix, or some manual renaming of variables from snake_case to camelCase, again to adhere to project standards.

Feel free to discard this PR, but I am hoping it is a useful improvement to the codebase.

Linting failed in deploymentConfig.js due to the static fields. Eslint supports this from ecmaVersion 13.
The full test suite failed because it tried to lint the tests, while the running linter did not do the same. Enabling linting gave errors due to jest having undef stuff, but overriding these files for jest env keeps the linting without these errors.
Removed to stop having eslint errors.
Updated with `npx standard --fix`.

Skipping environments.js and environments.test.js as they had a lot of
errors, handling those in a separate commit.
Updated with `npx standard --fix`.
This was done manually as no autofix was available.
@Gramatus
Copy link
Contributor Author

@decyjphr I see that the eslint config is changing from extending "standard" to extending "eslint:recommended" in #664. Would it be interesting if I made a new version of this, but using the new Eslint rules? I am hoping the repo can reach a the point where there are no lint errors, thus allowing enforcing linting on PRs, and would be happy to contribute towards that goal if it aligns with your goals.

@decyjphr decyjphr mentioned this pull request Dec 27, 2024
3 tasks
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

Successfully merging this pull request may close these issues.

2 participants