Gatsby ships with a built-in ESLint setup. For most users, our built-in ESlint setup is all you need. If you know however that you’d like to customize your ESlint config e.g. your company has their own custom ESlint setup, this shows how this can be done.
You’ll replicate (mostly) the ESLint config Gatsby ships with so you can then add additional presets, plugins, and rules.
Now that your packages have been installed, create a new file at the root of the site named
.eslintrc.js using the command below.
Copy the snippet below to the newly created
.eslintrc.js file. Then add additional presets, plugins, and rules as desired.
Edit this page on GitHub