From 337bbd01abf58f27560416e34fd6ba8ce50ab43d Mon Sep 17 00:00:00 2001 From: Thomas Uta Date: Wed, 13 Nov 2019 21:08:52 +0100 Subject: [PATCH] Add hint how to disable ESLint (#19171) * Add hint how to disable ESLint #19170 * Run prettier * Apply code review suggestion for docs/docs/eslint.md Co-Authored-By: LB * Run prettier * Add explanatory paragraph back * chore: format --- docs/docs/eslint.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/docs/eslint.md b/docs/docs/eslint.md index de3d8ff2c4438..79fb64e1ef081 100644 --- a/docs/docs/eslint.md +++ b/docs/docs/eslint.md @@ -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/).