Skip to content

Commit

Permalink
fix: allow const enum in dts file
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Dec 26, 2023
1 parent 8ff5311 commit be3efc6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/configs/typescript.ts
@@ -1,4 +1,4 @@
import { GLOB_TS, GLOB_TSX } from '../globs'
import { GLOB_JS, GLOB_TS, GLOB_TSX } from '../globs'
import { parserTypeScript, pluginAntfu, pluginTypeScript } from '../plugins'
import { restrictedSyntaxJs } from './javascript'
import type { FlatESLintConfigItem } from 'eslint-define-config'
Expand Down Expand Up @@ -69,10 +69,16 @@ export const typescript: FlatESLintConfigItem[] = [
},
},
{
files: ['**/*.js', '**/*.cjs'],
files: [GLOB_JS, '**/*.cjs'],
rules: {
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
},
{
files: ['**/*.d.ts'],
rules: {
'no-restricted-syntax': ['error', ...restrictedSyntaxJs],
},
},
]

0 comments on commit be3efc6

Please sign in to comment.