Skip to content

Commit

Permalink
Add hint how to disable ESLint (#19171)
Browse files Browse the repository at this point in the history
* Add hint how to disable ESLint #19170

* Run prettier

* Apply code review suggestion for docs/docs/eslint.md

Co-Authored-By: LB <[email protected]>

* Run prettier

* Add explanatory paragraph back

* chore: format
  • Loading branch information
ThomasJanUta authored and LB committed Nov 13, 2019
1 parent 10a8f65 commit 337bbd0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/docs/eslint.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ module.exports = {
}
```

Note: If you provide a custom `.eslintrc.js` file, Gatsby gives you full control about the ESLint configuration. This means that it will disable the built-in `eslint-loader` and you need to enable it yourself. One way to do so is to use the Community plugin [`gatsby-eslint-plugin`](/packages/gatsby-plugin-eslint/).
### Disabling ESLint

Create an empty .eslintrc.js file at the root of your project to disable linting.

If you want to disable ESLint completely, create an empty `.eslintrc` file.
When there is no ESLint file Gatsby implicitly adds a barebones ESLint loader. The empty file will disable this behavior as Gatsby assumes once you have an ESLint file you are in charge of linting.

Note: If you provide a custom `.eslintrc.js` file, Gatsby gives you full control about the ESLint configuration. This means that it will disable the built-in `eslint-loader` and you need to enable it yourself. One way to do so is to use the Community plugin [`gatsby-eslint-plugin`](/packages/gatsby-plugin-eslint/).

0 comments on commit 337bbd0

Please sign in to comment.