Make webpack use .eslintrc.json in ejected CRA (recent) #12381
Unanswered
svenhorner
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
You find multiple suggestions on how to do it, but all seem outdated or I am missing something else.
We want the webpackDevServer (
npm start
) to log the same errors and warnings asnpx eslint src/
does. We have an .eslintrc.json in the root of our project. So we need webpack to pick it up. When I added an .eslintrc.json in an unejected CRA project, it seemed to pick it up:Not so in the ejected one though. It always looks like this:

I tried adding
EXTEND_ESLINT=true
tonpm start
in thepackage.json
.eslintrc.json
innew ESLintPlugin({baseConfig: ...})
in theconfig/webpack.config.js
new ESLintPlugin
in theconfig/webpack.config.js
/src
,/config
, etc.So basically there is no documentation on how to achieve it. My hope that someone out there also recently had to deal with this and found a solution? Would be awesome, if you could share it then!
(Seems like the ejected version of create-react-app's result is a bit broken at the moment. Using .env files throws errors in the react-scripts as well at the momemt, but that's another story.)
Beta Was this translation helpful? Give feedback.
All reactions