-
-
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
ESLint v9 contains breaking API changes #3699
Comments
That expectation is flawed; the point of it being in beta is for plugins to begin to address the changes - announcements are irrelevant. Thanks for the report. A fix for this will also need to add eslint 9 into the test matrix. |
I put up a branch running tests on eslint 9; https://github.com/ljharb/eslint-plugin-react/actions/runs/8147742013/job/22269131527#step:5:21 is failing because the |
Additionally, when I comment out those 3 lines, i get 22166 failures because If the former, how can we run the same tests with both normal eslintrc stuff on eslint 8, and also with flat config on eslint 9? |
ESLint 9 makes the flat config the default. It renames the ESLintRC style classes to be There's a migration guide that might be a good place to start in terms of compiling a list of required tasks for this |
Awesome, thanks for the pointers. That will help get us unblocked for eslint 9, but we'll still have a lot of work to support eslint 10. |
Is there any update on this yet? Or is this still quite far off? The first release candidate for v9 released last week |
@james-yeoman it is almost never the case that all the plugins in the eslint ecosystem support a new major until awhile after the final release is out. It'd be great to beat that, but if there'd been any update, it'd be in this issue :-) |
Eslint officially released v9.0.0 today. Hope this plugin will support it soon! |
Getting |
I'd like to continue using this plugin, but this bug is unfortunately stopping me. I hope we get to see a fix soon! |
Nobody’s forcing you to upgrade to eslint 9 right away ¯\_(ツ)_/¯ new eslint majors always take months before everything supports them, and this one will take longer because it’s changing the default config format. |
Having worked on a couple of other plugins, I want to elaborate that I think there's two parts to this upgrade. The real breaking change for v9 is the fact that v9 has removed APIs - it looks like this is being covered in #3727. The second change is flat config compatibility. Consumers can use the plugin as-is (as long as the API issues are resolved). It is slightly more work, but it is possible. Of course, supporting the flat config natively makes it easier, and ESLint has a good migration guide should anyone wanting to upgrade to v9 feel like contributing a patch (I might eventually, but I have several other plugins that I'm focussing on). |
## What's the problem this PR addresses? This lets us remove the Rushstack fix, and dogfood the VSCode SDK with the flat config (which is the only available config in Eslint 9). I would have migrated us to Eslint 9, but eslint-plugin-react [isn't compatible yet](jsx-eslint/eslint-plugin-react#3699). ## How did you fix it? Migrate to eslint.config.mjs. ## Checklist <!--- Don't worry if you miss something, chores are automatically tested. --> <!--- This checklist exists to help you remember doing the chores when you submit a PR. --> <!--- Put an `x` in all the boxes that apply. --> - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). <!-- See https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released for more details. --> <!-- Check with `yarn version check` and fix with `yarn version check -i` --> - [x] I have set the packages that need to be released for my changes to be effective. <!-- The "Testing chores" workflow validates that your PR follows our guidelines. --> <!-- If it doesn't pass, click on it to see details as to what your PR might be missing. --> - [x] I will check that all automated PR checks pass before the PR gets reviewed.
yay, big step #3759 is done/merged. So I hope we see finish line 🏁, 🏃 Edit - I'm not package maintainer/developer :-), just spreading the message. |
When can we expect the next release? Do you intend to accumulate a few more merges before it? Thanks in advance! |
@targumon yes, i'm trying to gather as many semver-minors as i can before a release. |
Fixed in #3759. |
Is there an existing issue for this?
Description Overview
Upon bumping to the ESLint beta for v9, I was met with several errors in my monorepo during the linting test-run.
Namely:
context.getScope is not a function
"react/no-string-refs"
context.getFirstTokens is not a function
"react/display-name"
I get that it's still only a beta, but these API changes were announced in september 2023.
Additionally, there are some rule structure changes outlined separately that may be worth ensuring are in compliance.
Expected Behavior
Given that ESLint v9 is now in beta, I wasn't expecting to find any plugins that haven't yet addressed the API changes
eslint-plugin-react version
v7.34.0
eslint version
v9.0.0-beta.1
node version
v18.12.0
The text was updated successfully, but these errors were encountered: