Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: use eslint 9 internally#9119

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JoshuaKGoldberg merged 39 commits intotypescript-eslint:v8fromabrahamguo:eslint-9
Jul 6, 2024

Conversation

abrahamguo
Copy link
Contributor

PR Checklist

Overview

Use eslint@9 internally.

Smert, RayGuo-ergou, eilinora, and RobinTail reacted with thumbs up emojithetumper and RayGuo-ergou reacted with eyes emoji
@typescript-eslint
Copy link
Contributor

Thanks for the PR,@abrahamguo!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint.

@netlifyNetlify
Copy link

netlifybot commentedMay 18, 2024
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit5ffa053
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/6682ae69ef7ba90008f21054
😎 Deploy Previewhttps://deploy-preview-9119--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (🔴 down 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 90 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to yourNetlify site configuration.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedMay 18, 2024
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commit5ffa053. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 31 targets

Sent with 💌 fromNxCloud.

@abrahamguoabrahamguo marked this pull request as draftMay 18, 2024 22:41
@abrahamguoabrahamguo marked this pull request as ready for reviewMay 22, 2024 01:50
@bradzacher
Copy link
Member

bradzacher commentedMay 22, 2024
edited
Loading

We should delete this CI job

eslint_v9_tests:
name:Run tests on ESLint v9
needs:[build]
runs-on:ubuntu-latest
steps:
-name:Checkout
uses:actions/checkout@v4
-name:Install
uses:./.github/actions/prepare-install
with:
node-version:${{ env.PRIMARY_NODE_VERSION }}
-name:Build
uses:./.github/actions/prepare-build
-run:yarn add eslint@9
-name:Run tests
run:yarn test
env:
CI:true

have we got an existing integration test to check for regressions on eslint v8?


converting to draft until CI is passing.

abrahamguo reacted with eyes emoji

@bradzacherbradzacher marked this pull request as draftMay 22, 2024 11:48
@bradzacherbradzacher added this to the8.0.0 milestoneMay 22, 2024
@abrahamguo
Copy link
ContributorAuthor

@bradzacher there are currently no integration or CI tests for eslint 8. I can add one if you want, but do you feel that's necessary since we ask for eslint 9 in both our peerDependencies and devDependencies?

Doesn't seem like anything similar was added for eslint 7 when we moved from eslint 7=>8 (#3737)

Also, seems unrelated to this PR since this is about using eslint 9internally

@bradzacher
Copy link
Member

Looks like there's already an integration test for v8 -https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/integration-tests/fixtures/eslint-v8
So nothing to add!

Also, seems unrelated to this PR since this is about using eslint 9 internally

By moving to v9 internally our CI is no longer running against v8 - so we lose the test coverage asserting that we don't regress v8 compat.

But given we have the above integration test - we still have enough coverage.
It's not a super exhaustive test but it'll do (it's the same integration test coverage we maintained when we migrated to v8 internally)

@mattbrannon
Copy link

Just wanted to point out that one of your Netlify jobs has been running for nearly a week.
https://github.com/typescript-eslint/typescript-eslint/pull/9119/checks?check_run_id=25428243220

stefanmo, JoshuaKGoldberg, and SupraSmooth reacted with laugh emoji

['eslint-comments']: eslintCommentsPlugin,
['eslint-plugin']: eslintPluginPlugin,
['import']: importPlugin,
// https://github.com/import-js/eslint-plugin-import/issues/2948
['import']: fixupPluginRules(importPlugin),
Copy link
Member

Choose a reason for hiding this comment

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

we might want to consider switching toeslint-plugin-import-x?

Choose a reason for hiding this comment

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

I'd be in support of this as a separate followup yeah.

Comment on lines +520 to +521
...fixupConfigRules(compat.config(reactPlugin.configs.recommended)),
...fixupConfigRules(compat.config(reactHooksPlugin.configs.recommended)),
Copy link
Member

Choose a reason for hiding this comment

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

it's so weird that we need to fixup the plugin both here and in the plugin def.
seems like quite the flaw in the design of the compat tooling tbh

Copy link
ContributorAuthor

@abrahamguoabrahamguoJun 27, 2024
edited
Loading

Choose a reason for hiding this comment

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

@bradzacher that's actually not true.

This can be removedif you are OK with me editing the section at the top of this file labeledregistering all the plugins up-front, and removing any plugin for which we use a shared config (for example,reactPlugin andreactHooksPlugin).
Shared configs automatically register their corresponding plugin, so it is unnecessary to manually register the plugin.

The flip side, of course, would be if you felt that it's important to preserve a complete up-front list of all plugins used in any part of the config.

If we choose to keep the complete up-front list of plugins, then the reason why we have to use the compat utilities twice, is because the plugins are defined twice (again, redundantly so), and we need to make sure that inboth places that each plugin is registered, it is the fixed-up version.

@JoshuaKGoldbergJoshuaKGoldberg changed the titlefeat: use eslint 9 internallychore: use eslint 9 internallyJun 26, 2024
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

I think we'll need to keep ESLint 8 testing in there for a while - and there is some noise making it harder to review. But encouraging as a start! 🌞

@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */

Choose a reason for hiding this comment

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

[Non-Actionable] Heh, I wonder how much this will come into conflict with#9339...

@JoshuaKGoldbergJoshuaKGoldberg added the awaiting responseIssues waiting for a reply from the OP or another party labelJun 26, 2024
@github-actionsgithub-actionsbot removed the awaiting responseIssues waiting for a reply from the OP or another party labelJun 28, 2024
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Whoohoo! Thanks!! 🚀

@JoshuaKGoldbergJoshuaKGoldberg added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelJun 29, 2024
@abrahamguo
Copy link
ContributorAuthor

abrahamguo commentedJul 1, 2024
edited
Loading

ESLint 9 displays unused lint suppressions aswarnings, not errors (different from ESLint 8, which did not report unused lint suppressions), so there were 3 unused lint suppressions that were displayed in the pipeline but did not block it. I've removed all of those, and provided an explanation for each one.

JoshuaKGoldberg reacted with heart emoji

Copy link
Member

Choose a reason for hiding this comment

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

ESLint 9 displays unused lint suppressions aswarnings, not errors, so there were 3 unused lint suppressions that were displayed in the pipeline but did not block it. I've removed all of those, and provided an explanation for each one.

Hmmm, turns out oureslint.config.mjs doesn't havelinterOptions: { reportUnusedDisableDirectives: 'error' }. Maybe this is a good chance to turn it on?


This seems a bit suspicious to me though: this option has not been enabled for this repository until now. Maybe there are some considerations in favor of leaving this option disabled?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Just want to clarify that it was the upgrade from ESLint 8 to ESLint 9 that caused it to begin reporting unnecessary lint suppressions.
I feel like it makes sense to keep it at the default value, or change the level fromwarning toerror, but I'm open to further discussion.

Choose a reason for hiding this comment

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

Yeah I'd +1 switching toerror as a followup. Great find!

abrahamguo reacted with thumbs up emoji
Copy link
Member

@auvredauvred left a comment

Choose a reason for hiding this comment

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

🚀

V-Paranoiaque reacted with heart emoji
@JoshuaKGoldbergJoshuaKGoldberg merged commit86811d7 intotypescript-eslint:v8Jul 6, 2024
61 of 62 checks passed
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsJul 14, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg approved these changes

@bradzacherbradzacherbradzacher left review comments

@auvredauvredauvred approved these changes

Assignees
No one assigned
Labels
1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge
Projects
None yet
Milestone
8.0.0
Development

Successfully merging this pull request may close these issues.

5 participants
@abrahamguo@bradzacher@mattbrannon@JoshuaKGoldberg@auvred

[8]ページ先頭

©2009-2025 Movatter.jp