-
-
Notifications
You must be signed in to change notification settings - Fork 26.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-config-react-app is not compatible with ESLint 8 #11549
Comments
It would be great to have this support in the upcoming v5. |
Same behavior here! Eslint 8.0.0
|
Here is a dirty fix that you can use with diff --git a/node_modules/eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js b/node_modules/eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js
index 6171456..f1a9d72 100644
--- a/node_modules/eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js
+++ b/node_modules/eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _noUnusedExpressions = require('eslint/lib/rules/no-unused-expressions');
+var _noUnusedExpressions = require('eslint/use-at-your-own-risk').builtinRules.get('no-unused-expressions');
var _noUnusedExpressions2 = _interopRequireDefault(_noUnusedExpressions);
|
I am also facing this issue |
Why not back off eslint-config-react-app back to 7.x of eslint in the released version until 8.x is able to be integrated? It makes doing upgrades a bit of a mess. Just a suggestion. |
Temporary workaround: |
thanks @Avasam that did the trick |
Temporary workaround for yarn: |
I just did |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
Looks like the issue has been fixed. |
Heroku deploy was erroring with: Failed to load plugin 'flowtype' declared in '.eslintrc.json » eslint-config-react-app': Cannot find module 'eslint/use-at-your-own-risk' Solution was: npm i eslint-plugin-flowtype@latest eslint-plugin-import@latest eslint-plugin-react-hooks@next --force --save-dev As documented here: facebook/create-react-app#11549
It is still happening for me... and none of the fixes above are working. |
Heroku deploy was erroring with: Failed to load plugin 'flowtype' declared in '.eslintrc.json » eslint-config-react-app': Cannot find module 'eslint/use-at-your-own-risk' Solution was: npm i eslint-plugin-flowtype@latest eslint-plugin-import@latest eslint-plugin-react-hooks@next --force --save-dev As documented here: facebook/create-react-app#11549
Heroku deploy was erroring with: Failed to load plugin 'flowtype' declared in '.eslintrc.json » eslint-config-react-app': Cannot find module 'eslint/use-at-your-own-risk' Solution was: npm i eslint-plugin-flowtype@latest eslint-plugin-import@latest eslint-plugin-react-hooks@next --force --save-dev As documented here: facebook/create-react-app#11549
Heroku deploy was erroring with: Failed to load plugin 'flowtype' declared in '.eslintrc.json » eslint-config-react-app': Cannot find module 'eslint/use-at-your-own-risk' Solution was: npm i eslint-plugin-flowtype@latest eslint-plugin-import@latest eslint-plugin-react-hooks@next --force --save-dev As documented here: facebook/create-react-app#11549
This fix is really needed now that react-scripts deprecated version 4.0.3 (to my knowledge there will not be a 4.0.4 patch release: we need a way to install 5.0.x). That version has a dependency on immer 8.0.1 with vulnerability CVE-2020-28477, node-forge 0.10.0 with vulnerability CVE-2022-0122, and others. If the issue is "fixed", I sure am having trouble following the thread above or coming up with a way to update my
I tried some of the |
Spent a few more hours on this, it's really impossible to come up with a working
The number of permutations I've tried with different versions is about 50, and it's just way too much of a headache iterating on a simple issue like dependency updates. How do we get attention paid to this nightmare we face as react developers? |
Any update on the issue ? Still having errors |
I don't understand why this is causing permanent issues, also for projects that I try to upgrade. |
Nice. Figured I search for eslint before posting an issue to tell that eslint-config-react-app is not providing a new-config-file-format-compatible configuration for eslint. Found 197 open issues with 'eslint'. Half of them stale. At least 3 issues about the incompatibility, one of them also stale. React truly is the best framework in the world (I'm german and that was sarcasm) |
For me, I ended up needing to do this in Package.json:
Probably would be better to scope those overrides, but I'm not too worried since these are just for linting. |
Describe the bug
Looks like
eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js
imports file that's not exported explicitly.Environment
Eslint 8.0.0
eslint-plugin-flowtype: 6.1.0
eslint-config-react-app: 6.0.0
Expected behavior
No errors
Actual behavior
Error from the above
Reproducible demo
Clone https://github.com/ringcentral/ringcentral-javascript/tree/eslint8 (branch eslint8)
yarn install yarn test
The text was updated successfully, but these errors were encountered: