Skip to content

Commit

Permalink
adds @vitest/eslint-plugin and configs
Browse files Browse the repository at this point in the history
  • Loading branch information
scandar committed Nov 11, 2024
1 parent 5af2a34 commit ca05b28
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/linters/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { FlatCompat } from '@eslint/eslintrc'
import js from '@eslint/js'
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import globals from 'globals'
import tsParser from '@typescript-eslint/parser'
import vitest from '@vitest/eslint-plugin'
import globals from 'globals'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
Expand Down Expand Up @@ -91,5 +92,15 @@ export default [
'@typescript-eslint/require-array-sort-compare': 'error',
'@typescript-eslint/space-before-function-paren': 'off'
}
},
{
files: ['__tests__/**'],
plugins: {
vitest
},
rules: {
...vitest.configs.recommended.rules, // you can also use vitest.configs.all.rules to enable all rules
'vitest/max-nested-describe': ['error', { max: 3 }] // you can also modify rules' behavior using option like this
}
}
]

0 comments on commit ca05b28

Please sign in to comment.