Skip to content

Commit

Permalink
fix: disable unicorn/consistent-function-scoping for unit test file…
Browse files Browse the repository at this point in the history
…s of typescript
  • Loading branch information
sxzz committed Sep 2, 2024
1 parent f27dc03 commit 470906e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/configs/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import globals from 'globals'
import { isInEditor } from '../env'
import { configJs, pluginUnusedImports } from '../plugins'
import type { Config } from '../types'
import { GLOB_SRC_EXT } from '../globs'

export const restrictedSyntaxJs = [
'ForInStatement',
Expand Down Expand Up @@ -99,7 +100,7 @@ export const javascript: Config[] = [
},
},
{
files: ['**/*.{test,spec}.js?(x)'],
files: [`**/*.{test,spec}.${GLOB_SRC_EXT}`],
name: 'sxzz/test-rules',
rules: {
'no-unused-expressions': 'off',
Expand Down

0 comments on commit 470906e

Please sign in to comment.