Skip to content

Commit 682375b

Browse files
committed
chore: explicitly enable more rules that are on by default
1 parent 2e9b3fa commit 682375b

2 files changed

Lines changed: 17 additions & 7 deletions

File tree

shared/typescript-analysis.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ export default defineConfig({
1515
},
1616
rules: {
1717
'typescript/await-thenable': 'warn',
18+
'typescript/no-array-delete': 'warn',
1819
'typescript/no-confusing-non-null-assertion': 'warn',
1920
'typescript/no-confusing-void-expression': 'warn',
2021
'typescript/no-extra-non-null-assertion': 'warn',
2122
'typescript/no-floating-promises': 'warn',
2223
'typescript/no-implied-eval': 'warn',
2324
'typescript/no-for-in-array': 'error',
25+
'typescript/no-meaningless-void-operator': 'warn',
2426
'typescript/no-misused-promises': ['error', { checksVoidReturn: false }],
27+
'typescript/no-misused-spread': 'warn',
28+
'typescript/no-this-alias': 'warn',
2529
'typescript/no-unnecessary-type-assertion': 'warn',
2630
'typescript/only-throw-error': 'warn',
2731
'typescript/prefer-as-const': 'warn',

shared/typescript.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,19 @@ import { defineConfig } from 'oxlint';
66
export default defineConfig({
77
plugins: ['typescript'],
88
rules: {
9+
'typescript/array-type': ['warn', { default: 'array' }],
10+
'typescript/consistent-type-assertions': [
11+
'warn',
12+
{ assertionStyle: 'as', objectLiteralTypeAssertions: 'allow' },
13+
],
914
'typescript/no-dupe-class-members': 'warn',
15+
'typescript/no-duplicate-enum-values': 'warn',
16+
'typescript/no-empty-object-type': ['warn', { allowInterfaces: 'with-single-extends' }],
17+
'typescript/no-extra-non-null-assertion': 'warn',
18+
'typescript/no-misused-new': 'warn',
1019
'typescript/no-redeclare': 'warn',
20+
'typescript/no-unsafe-declaration-merging': 'warn',
21+
'typescript/no-unnecessary-parameter-property-assignment': 'warn',
1122
'typescript/no-unused-expressions': ['warn', { allowShortCircuit: true, enforceForJSX: true }],
1223
'typescript/no-unused-vars': [
1324
'warn',
@@ -20,14 +31,9 @@ export default defineConfig({
2031
},
2132
],
2233
'typescript/no-useless-constructor': 'warn',
23-
'typescript/array-type': ['warn', { default: 'array' }],
24-
'typescript/no-empty-object-type': ['warn', { allowInterfaces: 'with-single-extends' }],
34+
'typescript/no-useless-empty-export': 'warn',
2535
'typescript/no-wrapper-object-types': 'warn',
26-
'typescript/consistent-type-assertions': [
27-
'warn',
28-
{ assertionStyle: 'as', objectLiteralTypeAssertions: 'allow' },
29-
],
30-
'typescript/no-extra-non-null-assertion': 'warn',
36+
'typescript/triple-slash-reference': 'warn',
3137

3238
// The typescript-eslint FAQ recommends turning off "no-undef" in favor
3339
// of letting tsc check for undefined variables, including types

0 commit comments

Comments
 (0)