Skip to content

Commit 4d1a846

Browse files
committed
feat: enable more rules
1 parent 6654a5f commit 4d1a846

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/configs/javascript.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type { Config } from '../types'
55
export const restrictedSyntaxJs: string[] = [
66
'ForInStatement',
77
'LabeledStatement',
8-
'WithStatement',
98
]
109

1110
export const javascript = (): Config[] => [
@@ -57,12 +56,18 @@ export const javascript = (): Config[] => [
5756
},
5857
],
5958
'no-unused-vars': 'off',
59+
'no-useless-call': 'error',
60+
'no-useless-computed-key': 'error',
61+
'no-useless-constructor': 'error',
62+
'no-useless-rename': 'error',
63+
'no-var': 'error',
6064
'no-void': 'error',
6165
'object-shorthand': [
6266
'error',
6367
'always',
6468
{ avoidQuotes: true, ignoreConstructors: false },
6569
],
70+
'one-var': ['error', { initialized: 'never' }],
6671
'prefer-arrow-callback': [
6772
'error',
6873
{ allowNamedFunctions: false, allowUnboundThis: true },

src/configs/typescript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const typescriptCore = tseslint.config({
3939

4040
// handled by unused-imports/no-unused-imports
4141
'@typescript-eslint/no-unused-vars': 'off',
42-
42+
'@typescript-eslint/no-useless-constructor': 'error',
4343
'@typescript-eslint/prefer-as-const': 'warn',
4444
'@typescript-eslint/prefer-literal-enum-member': [
4545
'error',

0 commit comments

Comments
 (0)