ESLint Semistandard Style Config

17.0.0 · active · verified Sun Apr 19

`eslint-config-semistandard` provides an ESLint shareable configuration that enforces the JavaScript Semistandard Style. This style is a direct derivative of JavaScript Standard Style, with the key distinction of requiring semicolons at the end of statements, addressing a common preference among developers. Currently at version 17.0.0, the package maintains a close release cadence with `eslint-config-standard`, its upstream dependency, typically updating its major version whenever `eslint-config-standard` does. Its primary differentiator is this explicit support for semicolons, offering a pre-configured, opinionated linting setup for projects that value code consistency without the need to define a multitude of individual ESLint rules. This makes it an efficient choice for quick project setup while adhering to a widely recognized JavaScript style guide.

Common errors

Warnings

Install

Imports

Quickstart

Installs `eslint-config-semistandard` along with all necessary peer dependencies, then shows how to configure an `.eslintrc.json` file to extend the `semistandard` configuration, and provides a simple JavaScript file to demonstrate its application.

npm install --save-dev eslint eslint-config-semistandard eslint-plugin-import eslint-plugin-n eslint-plugin-promise eslint-config-standard

// .eslintrc.json
{
  "extends": "semistandard",
  "env": {
    "browser": true,
    "node": true,
    "es2021": true
  }
}

// index.js (example file to lint)
const path = require('path');

const greet = (name) => {
  console.log(`Hello, ${name}!`);
};

greet('World');

// Linting this file will enforce semicolon usage and other semistandard rules.
// For example, missing semicolons will be reported.
// To run: `npx eslint index.js`

view raw JSON →