|
| 1 | +{ |
| 2 | + "parser": "@typescript-eslint/parser", |
| 3 | + "parserOptions": { |
| 4 | + "warnOnUnsupportedTypeScriptVersion": false, |
| 5 | + "ecmaVersion": 6, |
| 6 | + "sourceType": "module" |
| 7 | + }, |
| 8 | + "env": { |
| 9 | + "browser": false, |
| 10 | + "node": true, |
| 11 | + "es6": true |
| 12 | + }, |
| 13 | + "plugins": [ |
| 14 | + "@typescript-eslint", "jsdoc", "no-null", "import" |
| 15 | + ], |
| 16 | + "rules": { |
| 17 | + "@typescript-eslint/adjacent-overload-signatures": "error", |
| 18 | + "@typescript-eslint/array-type": "error", |
| 19 | + |
| 20 | + "camelcase": "off", |
| 21 | + "@typescript-eslint/camelcase": ["error", { "properties": "never", "allow": ["^[A-Za-z][a-zA-Za-z]+_[A-Za-z]+$"] }], |
| 22 | + |
| 23 | + "@typescript-eslint/class-name-casing": "error", |
| 24 | + "@typescript-eslint/consistent-type-definitions": ["error", "interface"], |
| 25 | + "@typescript-eslint/interface-name-prefix": "error", |
| 26 | + "@typescript-eslint/no-inferrable-types": "error", |
| 27 | + "@typescript-eslint/no-misused-new": "error", |
| 28 | + "@typescript-eslint/no-this-alias": "error", |
| 29 | + "@typescript-eslint/prefer-for-of": "error", |
| 30 | + "@typescript-eslint/prefer-function-type": "error", |
| 31 | + "@typescript-eslint/prefer-namespace-keyword": "error", |
| 32 | + |
| 33 | + "quotes": "off", |
| 34 | + "@typescript-eslint/quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }], |
| 35 | + |
| 36 | + "semi": "off", |
| 37 | + "@typescript-eslint/semi": "error", |
| 38 | + |
| 39 | + "@typescript-eslint/triple-slash-reference": "error", |
| 40 | + "@typescript-eslint/type-annotation-spacing": "error", |
| 41 | + "@typescript-eslint/unified-signatures": "error", |
| 42 | + |
| 43 | + // scripts/eslint/rules |
| 44 | + "object-literal-surrounding-space": "error", |
| 45 | + "no-type-assertion-whitespace": "error", |
| 46 | + "type-operator-spacing": "error", |
| 47 | + "only-arrow-functions": ["error", { |
| 48 | + "allowNamedFunctions": true , |
| 49 | + "allowDeclarations": true |
| 50 | + }], |
| 51 | + "no-double-space": "error", |
| 52 | + "boolean-trivia": "error", |
| 53 | + "no-in-operator": "error", |
| 54 | + "simple-indent": "error", |
| 55 | + "debug-assert": "error", |
| 56 | + "no-keywords": "error", |
| 57 | + |
| 58 | + // eslint-plugin-import |
| 59 | + "import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }], |
| 60 | + |
| 61 | + // eslint-plugin-no-null |
| 62 | + "no-null/no-null": "error", |
| 63 | + |
| 64 | + // eslint-plugin-jsdoc |
| 65 | + "jsdoc/check-alignment": "error", |
| 66 | + |
| 67 | + // eslint |
| 68 | + "brace-style": ["error", "stroustrup", { "allowSingleLine": true }], |
| 69 | + "constructor-super": "error", |
| 70 | + "curly": ["error", "multi-line"], |
| 71 | + "dot-notation": "error", |
| 72 | + "eqeqeq": "error", |
| 73 | + "linebreak-style": ["error", "windows"], |
| 74 | + "new-parens": "error", |
| 75 | + "no-caller": "error", |
| 76 | + "no-duplicate-case": "error", |
| 77 | + "no-duplicate-imports": "error", |
| 78 | + "no-empty": "error", |
| 79 | + "no-eval": "error", |
| 80 | + "no-extra-bind": "error", |
| 81 | + "no-fallthrough": "error", |
| 82 | + "no-new-func": "error", |
| 83 | + "no-new-wrappers": "error", |
| 84 | + "no-return-await": "error", |
| 85 | + "no-restricted-globals": ["error", |
| 86 | + { "name": "setTimeout" }, |
| 87 | + { "name": "clearTimeout" }, |
| 88 | + { "name": "setInterval" }, |
| 89 | + { "name": "clearInterval" }, |
| 90 | + { "name": "setImmediate" }, |
| 91 | + { "name": "clearImmediate" } |
| 92 | + ], |
| 93 | + "no-sparse-arrays": "error", |
| 94 | + "no-template-curly-in-string": "error", |
| 95 | + "no-throw-literal": "error", |
| 96 | + "no-trailing-spaces": "error", |
| 97 | + "no-undef-init": "error", |
| 98 | + "no-unsafe-finally": "error", |
| 99 | + "no-unused-expressions": ["error", { "allowTernary": true }], |
| 100 | + "no-unused-labels": "error", |
| 101 | + "no-var": "error", |
| 102 | + "object-shorthand": "error", |
| 103 | + "prefer-const": "error", |
| 104 | + "prefer-object-spread": "error", |
| 105 | + "quote-props": ["error", "consistent-as-needed"], |
| 106 | + "space-in-parens": "error", |
| 107 | + "unicode-bom": ["error", "never"], |
| 108 | + "use-isnan": "error" |
| 109 | + } |
| 110 | +} |
0 commit comments