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

chore(workspace): Update eslint and add missing rules #3350

Merged
merged 10 commits into from
Aug 2, 2023

Conversation

kitten
Copy link
Member

@kitten kitten commented Aug 2, 2023

Summary

This simply upgrades eslint but also activates some rules for implicit rules we've had before but never explicitly stated, and inconsistencies that are easily sorted out by an eslint plugin.

Set of changes

  • The nullish coalescing, nullish coalescing assignment, and optional chaining operators are now restricted
    • This was implicit before, however, as this is untranspiled (as per our rule of not using transpiled syntax), this is not in our browser support and must be avoided (outside of tests)
  • Sequence expressions are now restricted
    • We only used a sequence expression once and that was an accidental usage. Outside of for-statements we never use them and they should just be disabled for the codebase, since the minifier does a better job at automatically using them as needed
  • Multiple declarators in a variable declarations are now restricted
    • We're very consistent about having one variable declarator per declaration, so this should be enforced
  • We now activate a rule to make type imports consistent and to avoid side-effect imports where it's unnecessary
  • Prettier has been upgraded, which adds a bunch of changes

@kitten kitten merged commit 344b544 into main Aug 2, 2023
6 checks passed
@kitten kitten deleted the chore/eslint-updates branch August 2, 2023 11:37
@kitten kitten mentioned this pull request Aug 2, 2023
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.

1 participant