Registry / testing / eslint-config-prettier

eslint-config-prettier

JSON →
library10.1.8jsnpmunverified

eslint-config-prettier is an ESLint shareable config that turns off all rules that are unnecessary or might conflict with Prettier. It selectively disables core ESLint rules and plugin rules (e.g., @typescript-eslint, import, react, unicorn) that are made redundant by Prettier's formatting. Version 10.1.8 is the current stable release, published as CommonJS with TypeScript declarations. The package follows a patch-only release cadence (no breaking changes since 10.x). Key differentiators: it is the official Prettier-ESLint integration maintained by the Prettier team, supports both legacy .eslintrc format and flat config via eslint-config-prettier/flat, and includes a CLI to check for conflicting rules. It requires eslint >=7.0.0.

npm install eslint-config-prettier
INSTALL
IMPORT
SIG · ESLINT-CONFIG-PRET
E
eslint-config-prettier
testingjavascriptv10.1.8
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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.

eslint-config-prettier (legacy)
extends: ['eslint-config-prettier']
extends: ['prettier']
Use 'eslint-config-prettier' (full name) in .eslintrc.js or eslint.config.js. For legacy config, add to extends array; for flat config, use 'eslint-config-prettier/flat'.
eslint-config-prettier/flat (flat config)
import configPrettier from 'eslint-config-prettier/flat'; export default [configPrettier, /* other configs */];
import { configPrettier } from 'eslint-config-prettier'; export default [configPrettier];
Since v10.1.0, the flat config entry is exported as a default object. Do not destructure; it's a single config object.
TypeScript types
import type { Config } from 'eslint-config-prettier';
import { Config } from 'eslint-config-prettier';
The package ships TypeScript declarations. For type-only imports, use 'import type' to avoid runtime errors.

Shows both legacy .eslintrc and flat config usage, plus CLI check for conflicts.

// .eslintrc.js (legacy) module.exports = { extends: [ 'some-other-config', 'eslint-config-prettier' ] }; // eslint.config.js (flat config - modern) import js from '@eslint/js'; import configPrettier from 'eslint-config-prettier/flat'; export default [ js.configs.recommended, configPrettier, // your other configs ]; // Check for conflicting rules via CLI: // npx eslint-config-prettier path/to/eslint.config.js
eslint-config-prettier --version
Debug
Known issues
breakingv10.0.0 dropped support for ESLint <7 and switched to CommonJS-only exports. TypeScript configs may break.
fix
Update ESLint to >=7 and ensure you are using CommonJS or ESM correctly. For flat config, import 'eslint-config-prettier/flat'.
affects: >=10.0.0
deprecatedThe 'eslint-config-prettier' entry point for flat config (without '/flat') is deprecated since v10.1.0. Use 'eslint-config-prettier/flat'.
fix
Change import from 'eslint-config-prettier' to 'eslint-config-prettier/flat' in flat ESLint configs.
affects: >=10.1.0
gotchaeslint-config-prettier only turns off formatting rules; it does not enable any rules. You must still configure other configs (e.g., @eslint/js, @typescript-eslint) for linting logic.
fix
Always include a base config like 'eslint:recommended' or '@eslint/js/recommended' before this config.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'eslint-config-prettier'
Package not installed or incorrect import path.
fix
Run 'npm install --save-dev eslint-config-prettier'. In flat config, use 'eslint-config-prettier/flat'.
TypeError: configPrettier is not a function or array
Using legacy default import for flat config (e.g., import prettier from 'eslint-config-prettier').
fix
Use 'import configPrettier from 'eslint-config-prettier/flat'' instead of default import from root.
Upgrade
Version history
10.1.8latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
eslint-config-prettier — npm install eslint-config-prettier · libregistry