eslint-config-raine

Raine's personal eslint configuration

ISC 9 个版本
安装
npm install eslint-config-raine
yarn add eslint-config-raine
pnpm add eslint-config-raine
bun add eslint-config-raine
README

eslint-config-raine

npm version

Raine's personal eslint configuration

https://eslint.org/docs/developer-guide/shareable-configs

Base config:

  • standard

Plugins:

  • eslint
  • eslint-config-standard
  • eslint-plugin-import
  • eslint-plugin-jsdoc
  • eslint-plugin-n
  • eslint-plugin-promise

Install

Install eslint-config-raine with eslint plugins:

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

Usage

package.json

  "eslintConfig": {
    "extends": [
      "raine"
    ]
  }

or

.eslintrc.json

{
  "extends": "raine"
}

Rules

These rules will automatically be used when you extend the config as shown above:

{
  "env": {
    "browser": true,
    "es6": true,
    "mocha": true,
    "jest": true
  },
  "extends": [
    "standard"
  ],
  "globals": {
    "Atomics": "readonly",
    "SharedArrayBuffer": "readonly"
  },
  "parserOptions": {
    "ecmaVersion": 2018,
    "sourceType": "module"
  },
  "plugins": [
    "jsdoc"
  ],
  "rules": {
    "arrow-parens": [
      2,
      "as-needed"
    ],
    "brace-style": [
      2,
      "stroustrup"
    ],
    "comma-dangle": [
      2,
      {
        "arrays": "only-multiline",
        "objects": "only-multiline",
        "imports": "always-multiline",
        "exports": "always-multiline"
      }
    ],
    "generator-star-spacing": [
      2,
      {
        "before": false,
        "after": true
      }
    ],
    "indent": [
      2,
      2,
      {
        "flatTernaryExpressions": true
      }
    ],
    "multiline-ternary": 0,
    "no-extra-parens": [
      2,
      "all",
      {
        "nestedBinaryExpressions": false
      }
    ],
    "no-var": 2,
    "object-curly-newline": 0,
    "object-property-newline": 0,
    "operator-linebreak": 0,
    "padded-blocks": 0,
    "quotes": [
      2,
      "single",
      {
        "allowTemplateLiterals": true
      }
    ],
    "space-before-function-paren": 0,
    "yield-star-spacing": [
      2,
      {
        "before": false,
        "after": true
      }
    ],
    "jsdoc/check-alignment": 2,
    "jsdoc/check-indentation": 2,
    "jsdoc/check-syntax": 2,
    "jsdoc/check-tag-names": 2,
    "jsdoc/check-types": 2,
    "jsdoc/implements-on-classes": 2,
    "jsdoc/no-types": 2,
    "jsdoc/no-undefined-types": 2
  }
}
版本列表
0.5.0 2023-09-28
0.4.0 2023-05-05
0.3.0 2021-04-06
0.2.2 2021-01-02
0.2.1 2021-01-02
0.2.0 2021-01-02
0.1.2 2020-11-14
0.1.1 2020-11-09
0.1.0 2020-11-09