|
1 | 1 | module.exports = {
|
2 | 2 | extends: [
|
3 |
| - 'plugin:@typescript-eslint/recommended-requiring-type-checking', |
| 3 | + 'plugin:@typescript-eslint/recommended-type-checked', |
| 4 | + 'plugin:@typescript-eslint/stylistic-type-checked', |
4 | 5 | './lib/extensions-requiring-type-checking'
|
5 | 6 | ],
|
6 | 7 | parser: '@typescript-eslint/parser',
|
7 | 8 | rules: {
|
8 | 9 | /*
|
9 | 10 | Overrides to TypeScript recommended rules:
|
10 |
| - https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended-requiring-type-checking.ts |
| 11 | + https://github.com/typescript-eslint/typescript-eslint/tree/v7.18.0/packages/eslint-plugin/src/configs/recommended-type-checked.ts |
11 | 12 | */
|
12 | 13 |
|
13 |
| - /* |
14 |
| - Allow usage of String.prototype.match for regular expression matching. |
15 |
| - */ |
16 |
| - '@typescript-eslint/prefer-regexp-exec': 'off', |
| 14 | + '@typescript-eslint/no-duplicate-enum-values': 'off', |
| 15 | + '@typescript-eslint/no-duplicate-type-constituents': 'off', |
| 16 | + '@typescript-eslint/no-loss-of-precision': 'off', |
| 17 | + '@typescript-eslint/no-redundant-type-constituents': 'off', |
| 18 | + '@typescript-eslint/no-unsafe-declaration-merging': 'off', |
| 19 | + '@typescript-eslint/no-unsafe-enum-comparison': 'off', |
17 | 20 |
|
18 | 21 | /*
|
19 | 22 | This rule can be confusing if you're not familiar with JavaScript's rules for binding `this`,
|
@@ -48,6 +51,13 @@ module.exports = {
|
48 | 51 | */
|
49 | 52 | '@typescript-eslint/unbound-method': ['error', { ignoreStatic: true }],
|
50 | 53 |
|
| 54 | + /* |
| 55 | + Overrides to TypeScript type-checked stylistic rules: |
| 56 | + https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/stylistic-type-checked.ts |
| 57 | + */ |
| 58 | + |
| 59 | + '@typescript-eslint/prefer-regexp-exec': 'off', |
| 60 | + |
51 | 61 | /*
|
52 | 62 | Overrides to Typescript rules outside of the recommended configuration:
|
53 | 63 | */
|
@@ -124,6 +134,8 @@ module.exports = {
|
124 | 134 | */
|
125 | 135 | '@typescript-eslint/prefer-nullish-coalescing': 'off',
|
126 | 136 |
|
| 137 | + '@typescript-eslint/prefer-optional-chain': 'error', |
| 138 | + |
127 | 139 | '@typescript-eslint/prefer-readonly': 'error',
|
128 | 140 |
|
129 | 141 | /*
|
|
0 commit comments