Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

gatsby-plugin-eslint-config

A Gatsby plugin that extends the default ESLint configuration.

Disclaimer

This plugin supports almost all rules added by the default configuration. Some rules are temporarily disabled. Please refer to these issues for more information.

Installation

npm i -D eslint-plugin-gatsby@npm:gatsby-plugin-eslint-config
yarn add -D eslint-plugin-gatsby@npm:gatsby-plugin-eslint-config

Installing eslint-plugin-gatsby@npm:gatsby-plugin-eslint-config sets eslint-plugin-gatsby as an alias for this plugin. This is done so that the plugin can be imported into .eslintrc.js.

Usage

.eslintrc.js

module.exports = {
  plugins: ["gatsby"],
  extends: ["plugin:gatsby/recommended"],
}

gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: "eslint-plugin-gatsby",
      options: {
        extensions: ["js", "jsx", "ts", "tsx"],
        failOnError: false,
      },
    },
  ],
}

Refer to the complete list of options.

© 2023 Gatsby, Inc.