question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dev server doesn't respect .eslintrc before eject

See original GitHub issue

Is 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

  1. create-react-app test-app
  2. add .eslintrc with new config
{
  "extends": "react-app",
  "plugins": ["fp"],
  "rules": {
    "import/first": "warn",
    "fp/no-let": "error"
  }
}
  1. yarn eslint src
  2. yarn start

Expected Behavior

Development server will respect new config

Actual Behavior

It’s doesn’t respect image image

And after eject it respects image

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:closed
  • Created 6 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
evgenyrodionovcommented, Feb 2, 2018

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.

2reactions
Timercommented, Feb 2, 2018

This is as expected, we do not respect any eslint configuration you set until you’ve ejected.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found