question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

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 browser are you using? (if relevant)

N/A

How are you deploying your application? (if relevant)

Vercel

Describe the Bug

ESLint is enforcing a rule which is breaking my build.

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 identical personal portfolio 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.

I have made an issue over at ESLint’s repo too as I’m not sure which would be more appropriate.

Expected Behavior

Builds should pass.

Link to reproduction

https://github.com/tr1s/nightizm

To Reproduce

Run npm run lint and see that these errors are showing up. They shouldn’t be showing up at all.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
JDansercoercommented, Sep 6, 2022

@ljharb this shouldn’t be closed, as eslint-plugin-react is a dependency of eslint-config-next and is currently not a direct dependency of our project. Next should update the version range to not include the broken dependency.

1reaction
tr1scommented, Sep 6, 2022

yeah @JDansercoer @ljharb looks like esling-config-next is using the old version of eslint-plugin-react:

CleanShot 2022-09-06 at 01 56 27@2x

I will keep the issue open until my eslint-config-next get’s updated. It’s currently 12.2.5 and 12.2.6 is in canary still (assuming this update will have the correctly updated package).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with Rules - ESLint - Pluggable JavaScript Linter
"problem" means the rule is identifying code that either will cause an error or may cause a confusing behavior. Developers should consider this...
Read more >
Ignore or prevent ESLint errors from breaking the build in a ...
If you want to force ESLint to always emit warnings (that will not stop you build) instead of errors, you need to set...
Read more >
Integrating and Enforcing Prettier & ESLint
Solution A: always run ESLint after Prettier · Solution B: disable conflicting ESLint rules.
Read more >
eslint-plugin-jsdoc - npm
Start using eslint-plugin-jsdoc in your project by running `npm i ... with the require-jsdoc rule, these settings can be enforced so as to ......
Read more >
ESLint v2.0.0-rc.1 released - ESLint中文文档
We just pushed ESLint v2.0.0-rc.1, which is a preview release upgrade of ESLint. ... We've updated the rules we recommend as a starting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found