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

RFC: Support eslint@9.0.0 #735

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

RFC: Support eslint@9.0.0 #735

wants to merge 7 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 require a version bump and minimum requirement increase to support.

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 2 times, most recently from 2fa6e8a to aed6721 Compare May 8, 2024 18:44
Copy link

trunk-staging-io bot commented May 9, 2024

❌ 427 failed 💊 0 quarantined ✅ 3 passed 🕐 436 new ⋅ (learn more)

docs ⋅ learn more about trunk.io

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