-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[New] support eslint v9 #3759
[New] support eslint v9 #3759
Conversation
CI with ESLint v9 fails here:
Seems I'll have to update |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3759 +/- ##
==========================================
- Coverage 97.79% 97.62% -0.17%
==========================================
Files 134 134
Lines 9613 9615 +2
Branches 3486 3486
==========================================
- Hits 9401 9387 -14
- Misses 212 228 +16 ☔ View full report in Codecov by Sentry. |
yes, you'll need to update the peerDeps and devDeps ranges to include eslint 9. |
In d8f3186, 9a86bc8 & 85eed32, I updated several tests where |
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
|
Done in a1402a2 & cda54a3. I expected the dev deps update to be problematic for linting since this project uses eslintrc config, but npm still installs ESLint v8 (I guess because of the plugins' peer deps) so it's okay. I can now see in CI the same tests that are failing for me locally with ESLint v9. Working on the fixes. |
Actually, it isn't okay everywhere in CI.
|
code: '<TestComponent only={this.handleChange} />', | ||
code: '<TestComponent2 only={this.handleChange} />', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looked like an intent to test both message
, and messageId
+ data
with two tests in a row, so I just modified one of those two a bit.
Refs #3699
Adds utility to automatically transform tests to ESLint v9 format when ESLint v9 is used.
I have all tests still passing with ESLint v8 locally (we'll see what happens with the older versions in CI).
Around ~500 tests are failing with ESLint v9 due to new RuleTester checks. Some because of problems in tests (e.g., duplicate tests or missing some now-mandatory test case properties), some because of problems in rules (e.g., no-op options schema or unsubstituted placeholders in messages). I'll try to fix that in separate commits in this PR.
Also fixed bugs that ESLint v9 RuleTester caught in rules
jsx-closing-bracket-location
andno-invalid-html-attribute
.