Skip to content

Contradicting doc (option "always") for semicolon #163

@Splines

Description

@Splines

In the docs for semi, you state that always was the default option.

* `"always"` (default) requires semicolons at the end of statements

However, when I use the following configuration in .eslintrc.js:

const stylistic = require("@stylistic/eslint-plugin");

const customized = stylistic.configs.customize({
  indent: 2,
  quotes: "double",
});

module.exports = {
  root: true,
  parserOptions: {
    ecmaVersion: 2024,
    sourceType: "module",
  },
  env: {
    browser: true,
    jquery: true,
  },
  extends: "eslint:recommended",
  plugins: [
    "@stylistic",
  ],
  rules: {
    ...customized.rules,
    "no-unused-vars": "warn",
  },
};

I get errors for having semicolons ("Extra semicolon"), such that I manually have to set

const customized = stylistic.configs.customize({
  indent: 2,
  quotes: "double",
  semi: "always",
});

I don't know but maybe this is related to this line?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions