不要怂,就是干,撸起袖子干!

.eslintrc.json 3.1 KB
{
  "rules": {
    "mocha/no-exclusive-tests": "error",
    "mocha/no-skipped-tests": "warn",

    // "jsdoc/check-param-names": "error",
    // "jsdoc/check-tag-names": "error",
    // "jsdoc/check-types": "error",
    // "jsdoc/newline-after-description": "error",
    // "jsdoc/no-undefined-types": "error",
    // "jsdoc/require-description-complete-sentence": "off",
    // "jsdoc/require-example": "off",
    // "jsdoc/require-hyphen-before-param-description": "off",
    // "jsdoc/require-param": "error",
    // "jsdoc/require-param-description": "error",
    // "jsdoc/require-param-name": "error",
    // "jsdoc/require-param-type": "error",
    // "jsdoc/require-returns-description": "off",
    // "jsdoc/require-returns-type": "error",
    // "jsdoc/valid-types": "off",

    "array-bracket-spacing": "error",
    "comma-spacing": "error",
    "key-spacing": "error",
    "keyword-spacing": "error",
    "object-curly-spacing": ["error", "always"],
    "func-call-spacing": ["error", "never"],

    "no-console": "off",
    "no-extra-parens": "error",
    "valid-jsdoc": "off",
    "new-cap": [
      "error",
      {
        "capIsNewExceptionPattern": "^BigInt",
        "properties": false
      }
    ],
    "no-extra-boolean-cast": "error",
    "strict": [
      "error",
      "global"
    ],
    "no-var": "error",
    "prefer-const": "error",
    "semi": [
      "error",
      "always"
    ],
    "space-before-function-paren": [
      "error",
      "never"
    ],
    "space-before-blocks": "error",
    "prefer-arrow-callback": "error",
    "arrow-parens": [
      "error",
      "as-needed"
    ],
    "comma-style": [
      "error",
      "last"
    ],
    "no-bitwise": "off",
    "no-cond-assign": [
      "error",
      "except-parens"
    ],
    "curly": "off",
    "eqeqeq": "error",
    "no-extend-native": "error",
    "wrap-iife": [
      "error",
      "any"
    ],
    "indent": [
      "error",
      2,
      {
        "SwitchCase": 1
      }
    ],
    "no-use-before-define": "off",
    "no-caller": "error",
    "no-undef": "error",
    "no-unused-vars": "error",
    "no-irregular-whitespace": "error",
    "max-depth": [
      "error",
      6
    ],
    "quotes": [
      "error",
      "single",
      {
        "avoidEscape": true
      }
    ],
    "linebreak-style": "error",
    "no-loop-func": "warn",
    "object-shorthand": "error",
    "one-var-declaration-per-line": "error",
    "comma-dangle": "error",
    "no-shadow": "warn",
    "camelcase": "warn",
    "prefer-template": "error",
    "no-else-return": ["error", { "allowElseIf": false }],
    "no-lonely-if": "error",
    "no-this-before-super": "error"
  },
  "parserOptions": {
    "ecmaVersion": 6,
    "sourceType": "script"
  },
  "plugins": [
    "mocha",
    "jsdoc"
  ],
  "env": {
    "node": true,
    "mocha": true,
    "es6": true
  }
  // "globals": {
  //   "Association": true,
  //   "HasMany": true,
  //   "BelongsTo": true,
  //   "HasOne": true,
  //   "BelongsToMany": true,
  //   "DataTypes": true,
  //   "Sequelize": true,
  //   "Transaction": true,
  //   "Model": true,
  //   "QueryInterface": true,
  //   "QueryType": true
  // }
}