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

Upgrades ESLint to Version 9 #2958

Merged
merged 8 commits into from
Nov 11, 2024
Merged

Upgrades ESLint to Version 9 #2958

merged 8 commits into from
Nov 11, 2024

Conversation

carbonrobot
Copy link
Contributor

@carbonrobot carbonrobot commented Nov 9, 2024

Upgrades ESLint to Version 9 (Flat file config), and Prettier to latest. No runtime code was changed for this PR.

How to review

Due to the nature of linting tools, this is a massive PR and it is easier to review by looking at the atomic commits, in order:

1. Remove NPS as the eslint task runner commit: c0c935

We are migrating away from NPS as a task runner and this commit removes eslint from the NPS scripts and directly executes it from root. This allows ESLint to manage its own parallelism and execute significantly faster and with less resources.

2. Upgrade ESLint to Version 9 commit: f45fdc

  • Upgrades ESLint to version 9 and reconfigures for the new flat file configuration format
  • Attempts to retain as many as the old rules as possible for simplicity
  • Drops the usage of FormidableLabs/eslint since that is deprecated
  • Drops the usage of eslint-plugin-import which does not have a fully compatible ESLint9 version yet
  • Imports Node and Browser globals

3. Resolve lint warnings in packages commit: 456a8

  • Removed the rules no-process-exit, max-statements, max-len, and complexity as providing low value
  • Formatting rules are deprecated in ESLint 9 and are now handled by prettier
  • The rule max-nested-callbacks now properly recognizes chained functions, so the disable comments have been removed
  • The rule react/no-did-mount-set-state is deprecated and no longer recommended
  • The rule @typescript-eslint/ban-types is deprecated and has been replaced by @typescript-eslint/no-unsafe-functions
  • The rule @typescript-eslint/no-empty-interface is deprecated and has been replaced by @typescript-eslint/no-empty-object-type
  • The rule @typescript-eslint/no-empty-function is deprecated and no longer recommended
  • Fixed several missing react imports

4. Resolve lint warnings in demos commit: 47d34c

  • Overrides several rules for the demo project. This project code will eventually be migrated into storybook, so we don't need to concern ourselves too greatly with it.

5. Resolve lint warnings in Storybook commit: 6f3f7a

  • Resolved several missing imports
  • Overrides several rules for storybook. In another PR we will cleanup the prettier warnings and re-enable that rule, but it was too big of a scope for this PR.

6. Resolve lint warnings in build scripts commit: ed209b

7. Resolve lint warnings in website commit: 59503

  • Disabled prettier for the website. In another PR we will cleanup the prettier warnings and re-enable that rule, but it was too big of a scope for this PR.

8. Remove unneccessary files from wireit deps commit: 7d5d8

Copy link

changeset-bot bot commented Nov 9, 2024

⚠️ No Changeset found

Latest commit: 7d5d8a5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Nov 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
victory ✅ Ready (Inspect) Visit Preview Nov 9, 2024 3:39pm

@carbonrobot carbonrobot changed the title chore/eslint upgrades Upgrades ESLint to Version 9 Nov 9, 2024
Copy link
Contributor

@ramenhog ramenhog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥👏 lgtm overall! Didn't see any obvious issues/errors when I played around with it locally either

@carbonrobot carbonrobot merged commit 150db93 into main Nov 11, 2024
8 checks passed
@carbonrobot carbonrobot deleted the chore/eslint-upgrades branch November 11, 2024 19:21
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