Registry / testing / gatsby-plugin-prettier-eslint

gatsby-plugin-prettier-eslint

JSON →
library1.0.6jsnpmunverified

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.

testingweb-framework
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

This is a Gatsby plugin, not a standard ES module. It is configured in gatsby-config.js using CommonJS module.exports.

module.exports = { plugins: [{ resolve: 'gatsby-plugin-prettier-eslint', options: { ... } }] }

Shows minimal gatsby-config setup using gatsby-plugin-prettier-eslint with Prettier for CSS/JSON etc. and ESLint for JS/TS files.

// Install dependencies // npm install prettier eslint gatsby-plugin-prettier-eslint // gatsby-config.js module.exports = { plugins: [ { resolve: 'gatsby-plugin-prettier-eslint', options: { prettier: { patterns: ['**/*.{css,scss,less}', '**/*.{json,json5}', '**/*.{graphql}', '**/*.{md,mdx}', '**/*.{html}', '**/*.{yaml,yml}'], }, eslint: { patterns: '**/*.{js,jsx,ts,tsx}', customOptions: { fix: true, cache: true }, }, }, }, ], };
Debug
Known footguns
gotchaDo NOT target the same file patterns with both prettier and eslint options to avoid redundant work or bad behaviour.
gotchaThe default initialScan true will format/lint the entire project on Gatsby startup, which may be slow for large projects.
gotchawatch is true by default, meaning formatting/linting runs on every save. This may cause performance issues or unexpected changes.
deprecatedThe package has not been updated since 2021 and may not be compatible with Gatsby v4+ or newer versions of ESLint/Prettier.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
13 hits · last 30 days
gptbot
4
ahrefsbot
4
script
1
Resources