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

Support and migrate to eslint@9.0.0 #735

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Support and migrate to eslint@9.0.0 #735

wants to merge 10 commits into from

Conversation

TylerJang27
Copy link
Collaborator

@TylerJang27 TylerJang27 commented Apr 9, 2024

Eslint@9.0.0 was released and with it a major change to how eslint is configured. The migration process is nontrivial and may not be an option/priority for every project. Additionally, upgrading will loudly fail unless you have accounted for the config. Accordingly, I have done the following:

  • Make direct_configs a property of commands, allowing us to version the configs that are applicable for linter
    • Users will only be upgraded/init'd/enabled at compatible versions with their config
  • Modify the eslint tests to handle pre- and post- eslint9
  • Upgrade this repo to use an eslint9 flat config
  • Perform an audit and address a handful of the new diagnostics coming from eslint9

This will requires a minimum version bump to support. Most of the files changes are lockfiles.

Copy link

trunk-io bot commented Apr 9, 2024

@TylerJang27 TylerJang27 marked this pull request as ready for review April 10, 2024 06:20
@TylerJang27 TylerJang27 marked this pull request as draft April 10, 2024 17:18
@TylerJang27
Copy link
Collaborator Author

Ultimately, there are 2 existing issues warranting this change (or a similar one):

  1. LUV cannot safely upgrade a user on eslint@8.x to eslint@9.x, since it will 100% break said user, even with the environment variable override that doesn't really work
  2. If we detect an eslint config, we need to know which version of eslint to enable at. Having an @package would alleviate this issue

TylerJang27 added a commit that referenced this pull request Apr 15, 2024
TylerJang27 added a commit that referenced this pull request Apr 23, 2024
Offers some temporary fixes to make `main` green and provide a migration
guide until we have a long-term story for #735. Also includes a node fix
with [executing `.bat`
files](https://github.com/trunk-io/plugins/actions/runs/8702103641/job/23865448625)
related to prebuild/prebuildify#83
@TylerJang27 TylerJang27 force-pushed the tyler/eslint-9 branch 3 times, most recently from aed6721 to 948302b Compare May 9, 2024 09:07
Copy link

trunk-staging-io bot commented May 9, 2024

💊 0 quarantined ✅ 261 passed 🕐 266 new ⋅ (learn more)

docs ⋅ learn more about trunk.io

@TylerJang27 TylerJang27 changed the title RFC: Support eslint@9.0.0 Support eslint@9.0.0 May 23, 2024
@TylerJang27 TylerJang27 marked this pull request as ready for review May 23, 2024 04:10
@TylerJang27 TylerJang27 requested a review from det May 23, 2024 04:12
@TylerJang27 TylerJang27 changed the title Support eslint@9.0.0 Support and migrate to eslint@9.0.0 May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant