create-react-app: Not compatible with VS Code + ESLint plugin
Perhaps this is an issue not in the scope of this project but…
Steps
$ create-react-app testApp && cd testApp
- Open project in VS Code with ESLint plugin installed
- Open any javascript file
Expected
ESLint plugin lints my code and displays errors.
Actual
VS Code display this error: No ESLint configuration found
This makes sense because there isn’t an eslint config file anywhere. I ran npm run eject
and changed config/eslint.js
to config/.eslintrc.js
to match '**/.eslintr{c.js,c.yaml,c.yml,c,c.json}'
per https://github.com/Microsoft/vscode-eslint/blob/master/eslint/extension.ts#L40. This didn’t fix the issue. Does anyone have any suggestions?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 21 (13 by maintainers)
Ideally I’d like different tools to adopt a convention of
configuration
field inpackage.json
that would specify base directory for all configs. We would just putreact-scripts/config
there, and Flow and ESLint could autodiscover them there. Tools don’t currently support this because zero conf environments are rare in JS.Please follow these instructions for integrating linting with your editor:
https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#display-lint-output-in-the-editor
It is unfortunate that we require global installation but this is a problem on ESLint’s end, and they intend to solve it: https://github.com/eslint/eslint/issues/3458.