ESLint not running/working
Started new "hello world" Gatsby project, ran "npm run develop"
According to Gatsby docs "Gatsby ships with a built-in ESLint setup. For most users, our built-in ESlint setup is all you need."
Get ESLint warning from ESLint VSCode extension.
"No ESLint configuration (e.g .eslintrc) found for file: /Users/.../src/pages/index.js"
System:
OS: macOS 10.14.4
CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Shell: 5.3 - /bin/zsh
Binaries:
Node: 11.9.0 - ~/.nvm/versions/node/v11.9.0/bin/node
npm: 6.10.1 - ~/.nvm/versions/node/v11.9.0/bin/npm
Languages:
Python: 2.7.13 - /Applications/MAMP/Library/bin/python
Browsers:
Chrome: 75.0.3770.142
Safari: 12.1
npmPackages:
gatsby: ^2.13.31 => 2.13.31
npmGlobalPackages:
gatsby-cli: 2.7.17
Hey, thanks for reporting. We use webpack to do eslint checks. You can override this behaviour by creating your own eslint configuration file in your project.
The default eslint config we use can be found https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/utils/eslint-config.js
Is that a similar approach to how create-react-app sets up its eslint config?
I'm asking b/c the ESLint extension in VSCode completely recognizes the eslint config whenever I start a project using CRA. However with the default Gatsby project it does not. I'd be happy to use the default eslint checks, but it's not recognized. I hope i'm making sense here.
It seems like CRA adds the following snippet to package.json.
"eslintConfig": {
"extends": "react-app"
}
This snippet is picked up by vscode eslint. We don't expose our eslint file. We can ship this with our official starters but it's pretty hard to do with gatsby-core.
This is something to 馃 about.
Hiya!
This issue has gone quiet. Spooky quiet. 馃懟
We get a lot of issues, so we currently close issues after 30 days of inactivity. It鈥檚 been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! 馃挭馃挏
Hey again!
It鈥檚 been 30 days since anything happened on this issue, so our friendly neighborhood robot (that鈥檚 me!) is going to close it.
Please keep in mind that I鈥檓 only a robot, so if I鈥檝e closed this issue in error, I鈥檓 HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks again for being part of the Gatsby community!
Most helpful comment
It seems like CRA adds the following snippet to package.json.
This snippet is picked up by vscode eslint. We don't expose our eslint file. We can ship this with our official starters but it's pretty hard to do with gatsby-core.
This is something to 馃 about.