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

ESLint randomly started enforcing new rule which is incorrect and breaking my builds #16278

Closed
1 task
tr1s opened this issue Sep 6, 2022 · 5 comments
Closed
1 task
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly repro:needed
Projects

Comments

@tr1s
Copy link

tr1s commented Sep 6, 2022

Environment

Node version: v16.15.1
npm version: 8.19.0
Local ESLint version: 8.23.0
Global ESLint version: N/A
Operating System: macOS Big Sur / M1 Mac

What parser are you using?

Default (Espree)

What did you do?

Configuration

/* .eslintrc.json */

{
  "extends": "next/core-web-vitals"
}

My code is viewable here.

File Vercel Build Error
ESLint_ERRORS ESLint-ERRORS-2

I went through my old vercel builds and found where it stopped working—I updated some packages and that was it. I just tried to revert back to all the old package versions where the builds were working fine and I still am getting the errors now.

I'm not sure why ESLint decided to enforce this rule randomly or why it's throwing an error even though it's a real property. I know I can ignore it with next.js configs but I'm instead trying to figure out what's happening here.

I also have an almost identical project with the same setup code and up-to-date packages in which I'm not having this issue. I can't understand why it's only happening on this repo.

If you have any ideas as to what's happening please let me know, thank you.

Posted over at next.js repo as well.

What did you expect to happen?

My build should pass.

What actually happened?

My build failed: Error: Unknown property 'key' found react/no-unknown-property

This is a real property and was working before with no issues, errors, or warnings.

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

No response

@tr1s tr1s added bug ESLint is working incorrectly repro:needed labels Sep 6, 2022
@eslint-github-bot eslint-github-bot bot added this to Needs Triage in Triage Sep 6, 2022
@ljharb
Copy link
Sponsor Contributor

ljharb commented Sep 6, 2022

This is an issue with v7.31.2-6 of eslint-plugin-react. Update to v7.31.7 and the problem should go away.

@ljharb
Copy link
Sponsor Contributor

ljharb commented Sep 6, 2022

@tr1s to be clear; this should be closed since it's not an issue with eslint. See jsx-eslint/eslint-plugin-react#3380

@tr1s
Copy link
Author

tr1s commented Sep 6, 2022

@ljharb neither of my projects are using that package, it's probably a peer dependancy though yeah. They're both using: "eslint": "^8.23.0" and "eslint-config-next": "^12.2.5"

Does that mean I have to wait for next.js to fix it under the hood or?

@ljharb
Copy link
Sponsor Contributor

ljharb commented Sep 6, 2022

No, it's a transitive dependency of eslint-config-next. You can either npm update eslint-plugin-react, or npm install eslint-config-next, or any number of things to update the transitive dependency.

In all of these cases, it's not an issue with eslint or eslint-config-next, so both of these issues should be closed.

@tr1s
Copy link
Author

tr1s commented Sep 6, 2022

@ljharb okay thank you.

@tr1s tr1s closed this as completed Sep 6, 2022
Triage automation moved this from Needs Triage to Complete Sep 6, 2022
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Mar 6, 2023
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Mar 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly repro:needed
Projects
Archived in project
Triage
Complete
Development

No branches or pull requests

2 participants