ESLint Shareable Config for JavaScript Standard Style

17.1.0 · maintenance · verified Sun Apr 19

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.

Common errors

Warnings

Install

Imports

Quickstart

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)

view raw JSON →