Registry / testing / eslint-config-standard

eslint-config-standard

JSON →
library17.1.0jsnpmunverified

eslint-config-standard is a shareable ESLint configuration that enforces JavaScript Standard Style rules. It is designed for advanced users who prefer to manage their ESLint setup manually, rather than using the all-in-one `standard` CLI tool. The current stable version is 17.1.0, which was released on May 29, 2023. While historically active, the project's maintenance status is noted as 'Sustainable' but with no new versions released to npm in the past 12 months, and low recent activity on its GitHub repository, potentially indicating a slower release cadence or a 'discontinued project' status, according to some analyses. Key differentiators include its opinionated, semicolon-free style and its integration with the broader ESLint ecosystem through specific plugin peer dependencies.

npm install eslint-config-standard
INSTALL
IMPORT
SIG · ESLINT-CONFIG-STAN
E
eslint-config-standard
testingjavascriptv17.1.0
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.

standard
{ "extends": "standard" }
{ "extends": "eslint-config-standard" }
Used as a string value in the `extends` array of an `.eslintrc` configuration file. The `eslint-config-` prefix is automatically assumed by ESLint. For ESLint Flat Configs (ESLint v9+), use `compat.extends('standard')` with `@eslint/compat`.
Node.js 12+
`"engines": { "node": ">=12.0.0"}` in `package.json`
This specifies the minimum Node.js version required by the package. Ensure your environment meets this requirement.
Overrides
{ "extends": "standard", "rules": { "semi": ["error", "always"] } }
Placing rules outside the `rules` object or with incorrect severity levels.
Individual rules can be overridden directly within the `rules` section of your `.eslintrc` file, after extending 'standard'. This allows customization while retaining the base style.

Demonstrates manual installation and configuration for `eslint-config-standard`, including `package.json` dev dependencies and a basic `.eslintrc.json` file. It also shows how to add and run linting scripts.

{ "name": "my-project", "version": "1.0.0", "description": "My JavaScript Standard Style project.", "main": "index.js", "scripts": { "lint": "eslint .", "lint:fix": "eslint . --fix" }, "keywords": [], "author": "", "license": "MIT", "devDependencies": { "eslint": "^8.0.1", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.25.2", "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", "eslint-plugin-promise": "^6.0.0" } } // .eslintrc.json { "extends": "standard", "env": { "node": true, "es2021": true }, "parserOptions": { "ecmaVersion": "latest", "sourceType": "module" }, "rules": { // Example: Override a rule to require semicolons, deviating from Standard Style // "semi": ["error", "always"] } } // index.js (example file to lint) const message = 'Hello, Standard Style'; console.log(message); // To run: // 1. `npm install` // 2. `npm run lint` // 3. `npm run lint:fix` (to automatically fix fixable errors)
Debug
Known issues
gotchaThis package is an ESLint configuration. For simpler usage, especially if you're new to linting or prefer an all-in-one CLI, consider using the `standard` package instead, which bundles the linter, formatter, and configuration.
fix
Evaluate if the `standard` CLI tool (globally or locally installed) better suits your workflow, as it handles setup automatically.
affects: >=1.0.0
breakingUpgrading to `eslint-config-standard` v17.0.0 requires ESLint v8 and updated peer dependencies (eslint-plugin-n, eslint-plugin-import, eslint-plugin-promise). It also replaced `eslint-config-node` with `eslint-plugin-n`. Rules referencing `node/` must be updated to `n/`.
fix
Ensure `eslint` is `^8.0.1` or higher and update all peer `eslint-plugin-*` dependencies to their compatible versions (e.g., `eslint-plugin-n: ^15.0.0 || ^16.0.0`, `eslint-plugin-promise: ^6.0.0`, `eslint-plugin-import: ^2.25.2`). Update any rule overrides or `eslint-disable` comments that reference `node/` rules to use `n/` instead.
affects: >=17.0.0
breaking`eslint-config-standard` requires Node.js version 12 or greater. Using older Node.js versions will result in installation or runtime errors.
fix
Upgrade your Node.js environment to version 12.0.0 or newer. Use a Node Version Manager (NVM) for easy switching if needed.
affects: <12.0.0
gotchaESLint's Flat Config system (introduced in ESLint v9) is not directly compatible with traditional `.eslintrc` configs. While `eslint-config-standard` still primarily uses the legacy format, direct usage with ESLint v9+ will require compatibility layers.
fix
For ESLint v9+ users, you must use `@eslint/compat` to translate the configuration, for example: `const { FlatCompat } = require("@eslint/compat"); const compat = new FlatCompat({ cwd: __dirname }); module.exports = [...compat.extends("standard"), /* ... other configs */];`
affects: >=17.1.0 (with ESLint v9+)
gotchaThe `eslint-plugin-n` peer dependency range (`^15.0.0 || ^16.0.0`) in `eslint-config-standard` v17.1.0 does not support `eslint-plugin-n` v17. This can lead to issues if `eslint-plugin-n` is auto-updated to v17 or higher.
fix
Manually pin `eslint-plugin-n` to a compatible version, e.g., `"eslint-plugin-n": "^16.0.0"`, or wait for `eslint-config-standard` to release a version with an updated peer dependency range that includes `eslint-plugin-n` v17+.
affects: 17.1.0
Errors
Common errors & fixes
Error: Failed to load config "standard" to extend from. Referenced from ...
The `eslint-config-standard` package or one of its peer dependencies is not installed, or ESLint cannot find it.
fix
Ensure `eslint-config-standard` and all its peer dependencies (`eslint`, `eslint-plugin-import`, `eslint-plugin-n`, `eslint-plugin-promise`) are correctly installed in your project's `devDependencies`. Run `npm install --save-dev eslint-config-standard eslint-plugin-promise eslint-plugin-import eslint-plugin-n`.
Parsing error: Cannot find module 'eslint-plugin-import'
A required ESLint plugin (e.g., `eslint-plugin-import`, `eslint-plugin-n`, `eslint-plugin-promise`) is missing or an incompatible version is installed.
fix
Install the missing plugin(s) as `devDependencies` using `npm install --save-dev eslint-plugin-import eslint-plugin-n eslint-plugin-promise`. Also, verify that the installed versions satisfy the peer dependency requirements of `eslint-config-standard`.
The style guide "standard" requires eslint@^8.0.1. You are currently using eslint@{version}. Do you want to downgrade?
Your installed ESLint version is incompatible with the version required by `eslint-config-standard` (or the `standard` CLI tool if using that directly).
fix
Upgrade or downgrade your `eslint` package to match the peer dependency range specified by `eslint-config-standard` (e.g., `npm install --save-dev eslint@^8.0.1`). If prompted during `npx eslint --init`, choose 'Yes' to downgrade or adjust your `package.json` manually.
Error: Node.js 8 is no longer supported.
Running `eslint-config-standard` with an unsupported Node.js version, typically older than Node.js 12.
fix
Upgrade your Node.js runtime to version 12 or newer. Use `nvm` or `fnm` to manage Node.js versions effectively.
Upgrade
Version history
17.1.0latest on npm
Audit
Dependencies
eslintrequiredCore ESLint engine for linting operations.
eslint-plugin-importrequiredHandles linting of ES2015+ import/export syntax, preventing issues with paths and resolution.
eslint-plugin-nrequiredESLint plugin for Node.js specific rules, replacing the older `eslint-plugin-node`.
eslint-plugin-promiserequiredEnforces best practices for JavaScript Promises.
Agent activity
2 hits · last 30 days
node
2
Resources