{"id":10823,"library":"eslint-config-standard","title":"ESLint Shareable Config for JavaScript Standard Style","description":"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.","status":"maintenance","version":"17.1.0","language":"javascript","source_language":"en","source_url":"git://github.com/standard/eslint-config-standard","tags":["javascript","JavaScript Standard Style","check","checker","code","code checker","code linter","code standards","code style"],"install":[{"cmd":"npm install eslint-config-standard","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-standard","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-standard","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core ESLint engine for linting operations.","package":"eslint","optional":false},{"reason":"Handles linting of ES2015+ import/export syntax, preventing issues with paths and resolution.","package":"eslint-plugin-import","optional":false},{"reason":"ESLint plugin for Node.js specific rules, replacing the older `eslint-plugin-node`.","package":"eslint-plugin-n","optional":false},{"reason":"Enforces best practices for JavaScript Promises.","package":"eslint-plugin-promise","optional":false}],"imports":[{"note":"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`.","wrong":"{ \"extends\": \"eslint-config-standard\" }","symbol":"standard","correct":"{ \"extends\": \"standard\" }"},{"note":"This specifies the minimum Node.js version required by the package. Ensure your environment meets this requirement.","symbol":"Node.js 12+","correct":"`\"engines\": { \"node\": \">=12.0.0\"}` in `package.json`"},{"note":"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.","wrong":"Placing rules outside the `rules` object or with incorrect severity levels.","symbol":"Overrides","correct":"{ \"extends\": \"standard\", \"rules\": { \"semi\": [\"error\", \"always\"] } }"}],"quickstart":{"code":"{\n  \"name\": \"my-project\",\n  \"version\": \"1.0.0\",\n  \"description\": \"My JavaScript Standard Style project.\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"lint\": \"eslint .\",\n    \"lint:fix\": \"eslint . --fix\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"eslint\": \"^8.0.1\",\n    \"eslint-config-standard\": \"^17.1.0\",\n    \"eslint-plugin-import\": \"^2.25.2\",\n    \"eslint-plugin-n\": \"^15.0.0 || ^16.0.0 \",\n    \"eslint-plugin-promise\": \"^6.0.0\"\n  }\n}\n\n// .eslintrc.json\n{\n  \"extends\": \"standard\",\n  \"env\": {\n    \"node\": true,\n    \"es2021\": true\n  },\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"rules\": {\n    // Example: Override a rule to require semicolons, deviating from Standard Style\n    // \"semi\": [\"error\", \"always\"]\n  }\n}\n\n// index.js (example file to lint)\nconst message = 'Hello, Standard Style';\nconsole.log(message);\n\n// To run:\n// 1. `npm install`\n// 2. `npm run lint`\n// 3. `npm run lint:fix` (to automatically fix fixable errors)\n","lang":"json","description":"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."},"warnings":[{"fix":"Evaluate if the `standard` CLI tool (globally or locally installed) better suits your workflow, as it handles setup automatically.","message":"This 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.","severity":"gotcha","affected_versions":">=1.0.0"},{"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.","message":"Upgrading 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/`.","severity":"breaking","affected_versions":">=17.0.0"},{"fix":"Upgrade your Node.js environment to version 12.0.0 or newer. Use a Node Version Manager (NVM) for easy switching if needed.","message":"`eslint-config-standard` requires Node.js version 12 or greater. Using older Node.js versions will result in installation or runtime errors.","severity":"breaking","affected_versions":"<12.0.0"},{"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 */];`","message":"ESLint'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.","severity":"gotcha","affected_versions":">=17.1.0 (with ESLint v9+)"},{"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+.","message":"The `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.","severity":"gotcha","affected_versions":"17.1.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"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`.","cause":"The `eslint-config-standard` package or one of its peer dependencies is not installed, or ESLint cannot find it.","error":"Error: Failed to load config \"standard\" to extend from. Referenced from ..."},{"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`.","cause":"A required ESLint plugin (e.g., `eslint-plugin-import`, `eslint-plugin-n`, `eslint-plugin-promise`) is missing or an incompatible version is installed.","error":"Parsing error: Cannot find module 'eslint-plugin-import'"},{"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.","cause":"Your installed ESLint version is incompatible with the version required by `eslint-config-standard` (or the `standard` CLI tool if using that directly).","error":"The style guide \"standard\" requires eslint@^8.0.1. You are currently using eslint@{version}. Do you want to downgrade?"},{"fix":"Upgrade your Node.js runtime to version 12 or newer. Use `nvm` or `fnm` to manage Node.js versions effectively.","cause":"Running `eslint-config-standard` with an unsupported Node.js version, typically older than Node.js 12.","error":"Error: Node.js 8 is no longer supported."}],"ecosystem":"npm"}