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 [email protected] #735

Merged
merged 10 commits into from
May 30, 2024
Merged

Support and migrate to [email protected] #735

merged 10 commits into from
May 30, 2024

Conversation

TylerJang27
Copy link
Collaborator

@TylerJang27 TylerJang27 commented Apr 9, 2024

[email protected] 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 [email protected] to [email protected], 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 [email protected] Support [email protected] 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 [email protected] Support and migrate to [email protected] May 23, 2024
@TylerJang27
Copy link
Collaborator Author

@det Plan for release since older CLI versions will naively respect LUV, AND also won't have the direct_configs update here:

  1. Land this
  2. Follow-up with a patch that omits eslint from LUV uploading
  3. Release plugins
  4. Let it marinate for ~1 week so that the newest LUV will stay at 8.57.0
  5. Revert the patch so that LUV will have the correct newest validated eslint version

The patch is only necessary for extra caution, in case someone is on a new CLI version but not a new plugins version (or on an old CLI version).

@TylerJang27 TylerJang27 merged commit 54c115b into main May 30, 2024
15 checks passed
@TylerJang27 TylerJang27 deleted the tyler/eslint-9 branch May 30, 2024 17:12
TylerJang27 added a commit that referenced this pull request May 31, 2024
This is a temporary mechanism to avoid sending new, 9.x validated
versions for eslint to LUV. That way, we can make a plugins release that
has the eslint9 support, and users on older CLI versions will have some
time to upgrade before we start OOTB recommending newest eslint. See
#735 (comment)

Intended to be reverted ~1 week after next plugins release
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.

2 participants