microsoft / rushstack

Monorepo for tools developed by the Rush Stack community
https://rushstack.io/
Other
5.93k stars 596 forks source link

[eslint-patch] Support eslint@8.1.0 / eslint-config-next@12.0.1 #2995

Open fmacherey opened 3 years ago

fmacherey commented 3 years ago

The current version of eslint@8.1.0 and eslint-config-next@12.0.1 are not supported yet.

yarn run v1.22.10
$ eslint --fix "./components/**/*" "./config/**/*" "./pages/**/*" "./helpers/**/*" "./@types/**/*"

Oops! Something went wrong! :(

ESLint: 8.1.0

Error: Cannot read config file: /Users/fmacherey/Projects/web-app-react/application/node_modules/eslint-config-next/index.js
Error: Failed to patch ESLint because the calling module was not recognized.
If you are using a newer ESLint version that may be unsupported, please create a GitHub issue:
https://github.com/microsoft/rushstack/issues
Referenced from: /Users/fmacherey/Projects/web-app-react/application/.eslintrc.js
hmbrg commented 3 years ago

Have you found a temporary fix for this?

fmacherey commented 3 years ago

Not yet. I am waiting for an update on this package here and didn't update eslint-config-next so far.

cobaltt7 commented 2 years ago

I'm getting this error:

Error: Failed to load plugin '@redguy12' declared in 'package.json': Failed to patch ESLint because the calling module was not recognized.
NieZhuZhu commented 2 years ago

Urgent need for support eslint8

weoking commented 1 year ago

I still got this problem

jamescostian commented 1 year ago

If you run into this issue only when using the eslint VS Code extension (not when running the eslint CLI like normal), your issue is probably fixed by https://github.com/microsoft/rushstack/pull/4272

taipo1 commented 7 months ago

I am running into this issue on a later version

Error: Cannot read config file: C:\dev\x\front-end\node_modules\eslint-config-next\index.js
Error: Failed to patch ESLint because the calling module was not recognized.
If you are using a newer ESLint version that may be unsupported, please create a GitHub issue:
https://github.com/microsoft/rushstack/issues
Referenced from:
    at Object.<anonymous> (C:\dev\x\front-end\node_modules\@rushstack\eslint-patch\lib\_patch-base.js:167:19)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (C:\dev\x\front-end\node_modules\@rushstack\eslint-patch\lib\modern-module-resolution.js:11:23)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
"node_modules/eslint-config-next": {
      "version": "^14.1.3",
      "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.2.0-canary.33.tgz",
      "integrity": "sha512-ieFqBntrIT1v2vyqCHjhDwjtp5eDBBaXw8s1bQKiimb0g6UwgoCrzUCY2KfWJuxHDYmAVsvlm/VXNb3+D9bM1A==",
      "dev": true,
      "dependencies": {
        "@next/eslint-plugin-next": "^14.1.3",
        "@rushstack/eslint-patch": "^1.3.3",
        "@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || 7.0.0 - 7.2.0",
        "eslint-import-resolver-node": "^0.3.6",
        "eslint-import-resolver-typescript": "^3.5.2",
        "eslint-plugin-import": "^2.28.1",
        "eslint-plugin-jsx-a11y": "^6.7.1",
        "eslint-plugin-react": "^7.33.2",
        "eslint-plugin-react-hooks": "^4.5.0 || 5.0.0-canary-7118f5dd7-20230705"
      },
      "peerDependencies": {
        "eslint": "^7.23.0 || ^8.0.0",
        "typescript": ">=3.3.1"
      },
      "peerDependenciesMeta": {
        "typescript": {
          "optional": true
        }
      }
    },

if there is more information i could provide pls let me know

UPDATE

I have tried overwriting "@rushstack/eslint-patch": "^1.3.3", to 1.8 in the package.json resulting in the same error

Alexander-Senatore commented 6 months ago

i have the same issue. did you ever resolve this?

kachkaev commented 1 week ago

Still a problem with ESLint v9 / Next.js 15. Just shared a reproduction here: https://github.com/eslint/config-inspector/issues/70#issuecomment-2441419320