visual studio code eslint support
See original GitHub issueDescription
The docs here https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md mention that vs code should support the eslint config without doing anything extra
VS Code ESLint plugin automatically detects Create React App's configuration file. So you do not need to create eslintrc.json at the root directory, except when you want to add your own rules. In that case, you should include CRA's config by adding this line:
in practice, with latest versions of everything, i still had to add .eslintrc containing { "extends": "react-app" }
in order for the editor to load a config
Expected behavior
VS Code ESLint plugin automatically detects Create React App’s configuration file
Actual behavior
VS Code ESLint plugin needs and .eslintrc file to detect any config
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts └── react-scripts@0.9.5 node -v v7.8.0 npm -v 4.2.0
- Operating system: macOS
I am not sure if this is a bug or a lack in documentation or I m just doing something wrong. If it’s the docs i can make a pull request I guess Cheers
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:15 (7 by maintainers)
Top GitHub Comments
Hi, I maintain the ESLint extension for VS Code and got here due to https://github.com/Microsoft/vscode-eslint/issues/230.
I created a react app using
create-react-app my-app
and the generated package.json file doesn’t contain aneslintConfig
property. After addingthings started to work for me. Is there something I am missing ?
I don’t think we’ll be creating
.eslintrc
in the project folder, no. A property inpackage.json
is a supported way to configure ESLint, so we would like to keep using that.