Integrates Prettier and ESLint with Gatsby, automatically formatting and linting files on save or during development. Version 1.0.6 is the latest (no release cadence specified). It runs in watch mode, supports initial full scan, and can be configured to process different file patterns for Prettier and ESLint separately. Unlike other plugins, it requires explicit peer dependency installation (prettier, eslint, gatsby ≥2.0.0) and offers granular control via gatsby-config options. It is ideal for keeping code style consistent during Gatsby development without manual formatting steps.
npm install gatsby-plugin-prettier-eslintVerified import paths — ran on the pinned version, not inferred.
Shows minimal gatsby-config setup using gatsby-plugin-prettier-eslint with Prettier for CSS/JSON etc. and ESLint for JS/TS files.
Configure prettier.patterns and eslint.patterns with non-overlapping globs.
Set initialScan: false in options to skip initial full scan.
Set watch: false in options to disable automatic formatting on save.
Consider alternative plugins like gatsby-plugin-eslint or manually configure lint-staged/husky.
Run: npm install prettier
Run: npm install eslint
Run: npm install gatsby-plugin-prettier-eslint. Ensure Gatsby is version 2.x or 3.x.