eslint-config-prettier-standard
raw JSON → 4.0.1 verified Sat Apr 25 auth: no javascript
An ESLint shareable config for projects using Prettier and JavaScript Standard Style as ESLint rules. Version 4.0.1 is the latest stable release. It combines eslint-config-standard and eslint-config-prettier, along with eslint-plugin-prettier and prettier-config-standard. The config ensures that ESLint rules do not conflict with Prettier formatting. Compared to alternatives like eslint-config-prettier alone, this package provides a zero-config setup that aligns with Standard Style. It supports both ESLint-config-based and JavaScript-based Prettier configuration.
Common errors
error Error: Failed to load plugin 'prettier' declared in 'BaseConfig' ↓
cause Missing eslint-plugin-prettier dependency
fix
npm install --save-dev eslint-plugin-prettier
error Cannot find module 'eslint-config-standard' ↓
cause Missing eslint-config-standard peer dep
fix
npm install --save-dev eslint-config-standard
error Configuration for rule 'prettier/prettier' is invalid ↓
cause Prettier plugin not installed or misconfigured
fix
Ensure eslint-plugin-prettier and prettier-config-standard are installed and extends includes 'prettier-standard'
Warnings
breaking Version 4.0.0 removed references to deprecated eslint-plugin-standard; ensure you are not using it. ↓
fix Remove eslint-plugin-standard from your dependencies; it's no longer needed.
deprecated Version 3.0.2 changed eslint-config-standard peer dependency range to <16.0.0 to avoid deprecation warnings. ↓
fix Use eslint-config-standard version 12 to <16.0.0.
gotcha Always put prettier-standard last in the extends array to avoid conflicts with Prettier. ↓
fix Order extends as: ['other-configs', 'prettier-standard']
Install
npm install eslint-config-prettier-standard yarn add eslint-config-prettier-standard pnpm add eslint-config-prettier-standard Imports
- prettier-standard wrong
extends: 'eslint-config-prettier-standard'correctextends: ['prettier-standard'] - prettier-standard/eslint-file-base wrong
extends: ['prettier-standard/eslint-file-base'] (missing /end)correctextends: ['prettier-standard/eslint-file-base', 'foo', 'prettier-standard/end'] - prettier-standard/end wrong
extends: ['prettier-standard/end'] alonecorrectextends: ['prettier-standard/eslint-file-base', 'prettier-standard/end']
Quickstart
// .eslintrc.json
{
"extends": [
"prettier-standard"
]
}