|
10 | 10 | "node": true,
|
11 | 11 | "es6": true
|
12 | 12 | },
|
| 13 | + "extends": [ |
| 14 | + "eslint:recommended", |
| 15 | + "plugin:@typescript-eslint/recommended", |
| 16 | + "plugin:@typescript-eslint/stylistic" |
| 17 | + ], |
13 | 18 | "plugins": [
|
14 | 19 | "@typescript-eslint", "no-null", "import", "eslint-plugin-local", "simple-import-sort"
|
15 | 20 | ],
|
|
25 | 30 | "/coverage/**"
|
26 | 31 | ],
|
27 | 32 | "rules": {
|
| 33 | + "max-statements-per-line": ["error", { "max": 1 }], |
28 | 34 | "simple-import-sort/imports": "error",
|
29 | 35 | "simple-import-sort/exports": "error",
|
30 | 36 |
|
31 |
| - "@typescript-eslint/adjacent-overload-signatures": "error", |
32 |
| - "@typescript-eslint/array-type": "error", |
33 |
| - "@typescript-eslint/no-array-constructor": "error", |
34 |
| - |
35 |
| - "brace-style": "off", |
36 |
| - "@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }], |
37 |
| - |
38 | 37 | "@typescript-eslint/naming-convention": [
|
39 | 38 | "error",
|
40 | 39 | { "selector": "typeLike", "format": ["PascalCase"], "filter": { "regex": "^(__String|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
|
|
48 | 47 | { "selector": "property", "format": null }
|
49 | 48 | ],
|
50 | 49 |
|
51 |
| - "@typescript-eslint/consistent-type-definitions": ["error", "interface"], |
52 |
| - "@typescript-eslint/consistent-type-assertions": ["error", { "assertionStyle": "as" }], |
53 |
| - |
54 |
| - "max-statements-per-line": ["error", { "max": 1 }], |
55 |
| - |
56 |
| - "no-duplicate-imports": "off", |
57 |
| - "@typescript-eslint/no-duplicate-imports": "error", |
58 |
| - |
59 |
| - "@typescript-eslint/no-inferrable-types": "error", |
60 |
| - "@typescript-eslint/no-misused-new": "error", |
61 |
| - "@typescript-eslint/no-this-alias": "error", |
62 |
| - |
63 |
| - "no-unused-expressions": "off", |
64 |
| - "@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }], |
65 |
| - |
66 |
| - "@typescript-eslint/prefer-for-of": "error", |
67 |
| - "@typescript-eslint/prefer-function-type": "error", |
68 |
| - "@typescript-eslint/prefer-namespace-keyword": "error", |
69 |
| - "@typescript-eslint/prefer-as-const": "error", |
70 |
| - |
71 |
| - "quotes": "off", |
| 50 | + "@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }], |
| 51 | + "@typescript-eslint/no-extra-semi": "error", |
72 | 52 | "@typescript-eslint/quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
|
73 |
| - |
74 |
| - "semi": "off", |
75 | 53 | "@typescript-eslint/semi": "error",
|
76 |
| - "@typescript-eslint/no-extra-semi": "error", |
77 |
| - |
78 |
| - "space-before-function-paren": "off", |
79 | 54 | "@typescript-eslint/space-before-function-paren": ["error", {
|
80 | 55 | "asyncArrow": "always",
|
81 | 56 | "anonymous": "always",
|
82 | 57 | "named": "never"
|
83 | 58 | }],
|
84 | 59 |
|
85 |
| - "@typescript-eslint/triple-slash-reference": "error", |
86 |
| - "@typescript-eslint/type-annotation-spacing": "error", |
87 |
| - "@typescript-eslint/unified-signatures": "error", |
88 |
| - |
89 |
| - "@typescript-eslint/no-extra-non-null-assertion": "error", |
| 60 | + // Todo: For each of these, investigate whether we want to enable them ✨ |
| 61 | + "@typescript-eslint/ban-types": "off", |
| 62 | + "no-case-declarations": "off", |
| 63 | + "no-cond-assign": "off", |
| 64 | + "no-constant-condition": "off", |
| 65 | + "no-control-regex": "off", |
| 66 | + "no-debugger": "off", |
| 67 | + "no-extra-boolean-cast": "off", |
| 68 | + "no-inner-declarations": "off", |
| 69 | + "no-useless-escape": "off", |
| 70 | + "prefer-rest-params": "off", |
| 71 | + "prefer-spread": "off", |
| 72 | + "@typescript-eslint/no-empty-function": "off", |
| 73 | + "@typescript-eslint/no-empty-interface": "off", |
| 74 | + "@typescript-eslint/no-explicit-any": "off", |
| 75 | + "@typescript-eslint/no-unused-vars": "off", |
| 76 | + |
| 77 | + // Pending https://github.com/typescript-eslint/typescript-eslint/issues/4820 |
| 78 | + "@typescript-eslint/prefer-optional-chain": "off", |
| 79 | + |
| 80 | + // Rules enabled in typescript-eslint configs that are not applicable here |
| 81 | + "@typescript-eslint/ban-ts-comment": "off", |
| 82 | + "@typescript-eslint/class-literal-property-style": "off", |
| 83 | + "@typescript-eslint/consistent-indexed-object-style": "off", |
| 84 | + "@typescript-eslint/no-duplicate-enum-values": "off", |
| 85 | + "@typescript-eslint/no-namespace": "off", |
| 86 | + "@typescript-eslint/no-non-null-asserted-optional-chain": "off", |
| 87 | + "@typescript-eslint/no-var-requires": "off", |
90 | 88 |
|
91 | 89 | // scripts/eslint/rules
|
92 | 90 | "local/object-literal-surrounding-space": "error",
|
|
111 | 109 | "no-null/no-null": "error",
|
112 | 110 |
|
113 | 111 | // eslint
|
114 |
| - "constructor-super": "error", |
115 | 112 | "curly": ["error", "multi-line"],
|
116 | 113 | "dot-notation": "error",
|
117 | 114 | "eqeqeq": "error",
|
118 | 115 | "linebreak-style": ["error", "windows"],
|
119 | 116 | "new-parens": "error",
|
120 | 117 | "no-caller": "error",
|
121 |
| - "no-duplicate-case": "error", |
122 |
| - "no-empty": "error", |
123 | 118 | "no-eval": "error",
|
124 | 119 | "no-extra-bind": "error",
|
125 |
| - "no-fallthrough": "error", |
126 | 120 | "no-new-func": "error",
|
127 | 121 | "no-new-wrappers": "error",
|
128 | 122 | "no-return-await": "error",
|
|
134 | 128 | { "name": "setImmediate" },
|
135 | 129 | { "name": "clearImmediate" }
|
136 | 130 | ],
|
137 |
| - "no-sparse-arrays": "error", |
138 | 131 | "no-template-curly-in-string": "error",
|
139 | 132 | "no-throw-literal": "error",
|
140 | 133 | "no-trailing-spaces": "error",
|
141 | 134 | "no-undef-init": "error",
|
142 |
| - "no-unsafe-finally": "error", |
143 |
| - "no-unused-labels": "error", |
144 | 135 | "no-var": "error",
|
145 | 136 | "object-shorthand": "error",
|
146 | 137 | "prefer-const": "error",
|
147 | 138 | "prefer-object-spread": "error",
|
148 | 139 | "quote-props": ["error", "consistent-as-needed"],
|
149 | 140 | "space-in-parens": "error",
|
150 |
| - "unicode-bom": ["error", "never"], |
151 |
| - "use-isnan": "error", |
152 |
| - "no-prototype-builtins": "error", |
153 |
| - "no-self-assign": "error", |
154 |
| - "no-dupe-else-if": "error" |
| 141 | + "unicode-bom": ["error", "never"] |
155 | 142 | },
|
156 | 143 | "overrides": [
|
157 | 144 | // By default, the ESLint CLI only looks at .js files. But, it will also look at
|
|
0 commit comments