dev server doesn't respect .eslintrc before eject
See original GitHub issueIs this a bug report?
Yes
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
ESLint
Environment
$ node -v
v9.2.1
$ npm -v
5.5.1
$ yarn --version
1.3.2
$ npm ls react-scripts
cra-eslint-integration-bug@0.1.0 /private/tmp/cra-eslint-integration-bug
└── react-scripts@1.1.0
Operating system: macOS 10.13
Steps to Reproduce
create-react-app test-app
- add
.eslintrc
with new config
{
"extends": "react-app",
"plugins": ["fp"],
"rules": {
"import/first": "warn",
"fp/no-let": "error"
}
}
yarn eslint src
yarn start
Expected Behavior
Development server will respect new config
Actual Behavior
It’s doesn’t respect
And after eject it respects
Reproducible Demo
$ git clone https://github.com/evgenyrodionov/cra-eslint-integration-bug
$ git checkout abaeedb # new config without eject
$ git checkout c0e1247 # new config with eject
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Why do I keep getting "[eslint] Delete `CR` [prettier/prettier]"?
Try setting the "endOfLine":"auto" in your .prettierrc (or .prettierrc.json) file (inside the object). Or set 'prettier/prettier': [ 'error' ...
Read more >How to use ESLint in Webpack 5 - Setup Tutorial
The tutorial walks you through a Webpack with ESLint setup to improve the code style of your JavaScript applications ...
Read more >How to Format Code on Save in VS Code with ESlint
Open a JavaScript or TypeScript file (it doesn't matter which). Open your VS Code command palette. Search for the command TypeScript: Restart TS ......
Read more >Node.js API - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >eslint | Yarn - Package Manager
Make sure your plugins (and ESLint) are both in your project's package.json as devDependencies (or dependencies, if your project uses ESLint at runtime)....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s not obvious, maybe add notice in documentation? I spent 2 hours because of this “expected” behavior.
It’s also conflicting with recipe of integrating eslint with code editor: why my eslintrc respected by code editor, but not with dev server (who recommend me use custom eslintrc)? Very confusing.
This is as expected, we do not respect any eslint configuration you set until you’ve ejected.