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

Support ESLint 7.x #8977

Closed
MichaelDeBoey opened this issue May 9, 2020 · 10 comments · Fixed by #8978
Closed

Support ESLint 7.x #8977

MichaelDeBoey opened this issue May 9, 2020 · 10 comments · Fixed by #8978

Comments

@MichaelDeBoey
Copy link
Contributor

ESLint v7.0.0 is released 🎉

It would be awesome to have official ESLint 7 support. 👊
I'm happy to help where I can of course 🙂

@ldrick
Copy link

ldrick commented May 9, 2020

In a lerna monorepo since ESLint 7.0.0 extending the eslint-config-create-app seems to not work.
In my ./packages/myreactpackage/.eslintrc.js i have:

module.exports = {
  root: true,
  extends: ['react-app'],
};

Is there something to be changed here or in eslint itself, it seems the new plugin-loading-mechanism is kicking in?

yarn lint
yarn run v1.22.4
$ eslint . --ext .html,.js,.jsx,.ts,.tsx --fix && lerna run lint:styles

Oops! Something went wrong! :(

ESLint: 7.0.0

ESLint couldn't find the config "react-app" to extend from. Please check that the name of the config is correct.

The config "react-app" was referenced from the config file in "[redacted]\packages\myreactpackage\.eslintrc.js".

If you still have problems, please stop by https://gitter.im/eslint/eslint to chat with the team.

@bartlomiejzuber
Copy link

bartlomiejzuber commented May 12, 2020

Looks like the problem is location of the eslint-config-react-app, currently it lays inside node_modules\react-scripts\node_modules while Eslint's v7 seems to only look at plugins that are on the first level of node_modules directory. Hope this helps eslint/eslint#13283.

@ldrick
Copy link

ldrick commented May 15, 2020

Seems like yarn dedupe mechanism kicks in eslint/eslint#13283.
Maybe it is necessary to document setting up eslint-config-react-app and its peer dependencies to get the possibility to extend this config?

@silverwind
Copy link

silverwind commented Jun 10, 2020

Kind of unrelated, but I think eslint-config-react-app should just list all its dependencies as actual dependencies, not peerDependencies. That way one can depend on it directly without having to list all the peer deps as well. package managers will dedupe dependencies correctly in either case.

@bennettdams
Copy link

It would be nice to have a small guide on how to integrate the new ESLint version with TypeScript, Prettier and VS Code.

Related to this proposal:
#8849 Recommended way of config integration with ESLint, TypeScript, Prettier and VS Code

tomvothecoder added a commit to esgf2-us/metagrid that referenced this issue Jun 15, 2020
- This is due to compatibility issues with eslint 7 and react-scripts
- Related issue: facebook/create-react-app#8977
@JamesMcMahon
Copy link

JamesMcMahon commented Jul 30, 2020

Why was this closed?

I get that version was pinned for now but is there a track of work to update it?

@otroboe
Copy link

otroboe commented Aug 5, 2020

Same question here, it's already 7.6.0 and react-scripts is still stuck on the 6.6.0 :(

@otroboe
Copy link

otroboe commented Aug 17, 2020

I'll answer myself, it's on the way, with 4.0 release:
https://github.com/facebook/create-react-app/milestone/69

Edit: when 4.0 will be ready, ESLint will probably be on version 8.

@derekschinke
Copy link

Well, got the same issue with create-react-app 4.0. And ESLint is on version 7 still.

@tachiba
Copy link

tachiba commented Jan 5, 2021

If you have duplicated dependencies in your project, a package manager may install react-scripts dependencies into <rootDir>/node_modules/react-scripts/node_modules not <rootDir>/node_modules.
In that case, you need to remove duplicates, delete node_modules and install again for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants