Skip to content

Commit 282c360

Browse files
committed
feat: update TypeScript configuration options
1 parent 18838a4 commit 282c360

File tree

1 file changed

+35
-6
lines changed

1 file changed

+35
-6
lines changed

src/configs/typescript.ts

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,28 +45,57 @@ export async function typescript(
4545
const tsconfigPath = options.tsconfigPath
4646
const isTypeAware = !!tsconfigPath
4747

48+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslintrc/recommended-type-checked.ts
4849
const typeAwareRules: TypedFlatConfigItem['rules'] = {
49-
'dot-notation': 'off',
50+
'no-array-constructor': 'off',
5051
'no-implied-eval': 'off',
52+
'no-throw-literal': 'off',
53+
'no-unused-expressions': 'off',
54+
'no-unused-vars': 'off',
55+
'prefer-promise-reject-errors': 'off',
5156
'require-await': 'off',
5257
'ts/await-thenable': 'error',
53-
'ts/dot-notation': ['error', { allowKeywords: true }],
58+
'ts/ban-ts-comment': 'error',
59+
'ts/no-array-constructor': 'error',
60+
'ts/no-array-delete': 'error',
61+
'ts/no-base-to-string': 'error',
62+
'ts/no-duplicate-enum-values': 'error',
63+
'ts/no-duplicate-type-constituents': 'error',
64+
'ts/no-empty-object-type': 'error',
65+
'ts/no-explicit-any': 'error',
66+
'ts/no-extra-non-null-assertion': 'error',
5467
'ts/no-floating-promises': 'error',
5568
'ts/no-for-in-array': 'error',
5669
'ts/no-implied-eval': 'error',
70+
'ts/no-misused-new': 'error',
5771
'ts/no-misused-promises': 'error',
72+
'ts/no-namespace': 'error',
73+
'ts/no-non-null-asserted-optional-chain': 'error',
74+
'ts/no-redundant-type-constituents': 'error',
75+
'ts/no-require-imports': 'error',
76+
'ts/no-this-alias': 'error',
5877
'ts/no-unnecessary-type-assertion': 'error',
78+
'ts/no-unnecessary-type-constraint': 'error',
5979
'ts/no-unsafe-argument': 'error',
6080
'ts/no-unsafe-assignment': 'error',
6181
'ts/no-unsafe-call': 'error',
82+
'ts/no-unsafe-declaration-merging': 'error',
83+
'ts/no-unsafe-enum-comparison': 'error',
84+
'ts/no-unsafe-function-type': 'error',
6285
'ts/no-unsafe-member-access': 'error',
6386
'ts/no-unsafe-return': 'error',
64-
'ts/promise-function-async': 'error',
87+
'ts/no-unsafe-unary-minus': 'error',
88+
'ts/no-unused-expressions': 'error',
89+
'ts/no-unused-vars': 'error',
90+
'ts/no-wrapper-object-types': 'error',
91+
'ts/only-throw-error': 'error',
92+
'ts/prefer-as-const': 'error',
93+
'ts/prefer-namespace-keyword': 'error',
94+
'ts/prefer-promise-reject-errors': 'error',
95+
'ts/require-await': 'error',
6596
'ts/restrict-plus-operands': 'error',
6697
'ts/restrict-template-expressions': 'error',
67-
'ts/return-await': 'error',
68-
'ts/strict-boolean-expressions': 'error',
69-
'ts/switch-exhaustiveness-check': 'error',
98+
'ts/triple-slash-reference': 'error',
7099
'ts/unbound-method': 'error',
71100
}
72101

0 commit comments

Comments
 (0)