Skip to content

Commit 470906e

Browse files
committedSep 2, 2024··
fix: disable unicorn/consistent-function-scoping for unit test files of typescript
1 parent f27dc03 commit 470906e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/configs/javascript.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import globals from 'globals'
22
import { isInEditor } from '../env'
33
import { configJs, pluginUnusedImports } from '../plugins'
44
import type { Config } from '../types'
5+
import { GLOB_SRC_EXT } from '../globs'
56

67
export const restrictedSyntaxJs = [
78
'ForInStatement',
@@ -99,7 +100,7 @@ export const javascript: Config[] = [
99100
},
100101
},
101102
{
102-
files: ['**/*.{test,spec}.js?(x)'],
103+
files: [`**/*.{test,spec}.${GLOB_SRC_EXT}`],
103104
name: 'sxzz/test-rules',
104105
rules: {
105106
'no-unused-expressions': 'off',

0 commit comments

Comments
 (0)
Please sign in to comment.