Skip to content

Commit a76fde9

Browse files
authored
feat: ban declarations in ts file (#264)
1 parent 5291cc9 commit a76fde9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/configs/javascript.ts

+2
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ export function javascript(options: OptionsIsInEditor & OptionsOverrides = {}):
116116
'DebuggerStatement',
117117
'LabeledStatement',
118118
'WithStatement',
119+
'TSEnumDeclaration[const=true]',
120+
'TSExportAssignment',
119121
],
120122
'no-self-assign': ['error', { props: true }],
121123
'no-self-compare': 'error',

src/configs/typescript.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ export function typescript(
8181
'antfu/generic-spacing': 'error',
8282
'antfu/named-tuple-spacing': 'error',
8383
'antfu/no-cjs-exports': 'error',
84-
'antfu/no-const-enum': 'error',
85-
'antfu/no-ts-export-equal': 'error',
86-
84+
8785
'no-dupe-class-members': OFF,
8886
'no-invalid-this': OFF,
8987
'no-loss-of-precision': OFF,
@@ -122,6 +120,10 @@ export function typescript(
122120
'eslint-comments/no-unlimited-disable': OFF,
123121
'import/no-duplicates': OFF,
124122
'unused-imports/no-unused-vars': OFF,
123+
'no-restricted-syntax': [
124+
'error',
125+
'[declare=true]',
126+
],
125127
},
126128
},
127129
{

0 commit comments

Comments
 (0)