-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.ts
33 lines (30 loc) · 905 Bytes
/
jest.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { TSESLint } from '@typescript-eslint/utils'
import eslintPluginJest from 'eslint-plugin-jest'
const files = ['**/*.test.{js,ts,jsx,tsx}']
export const recommended: TSESLint.FlatConfig.ConfigArray = [
{
files,
...eslintPluginJest.configs['flat/recommended'],
languageOptions: {
...eslintPluginJest.configs['flat/recommended'].languageOptions,
parserOptions: {
project: 'tsconfig.jest.json'
}
},
rules: {
...eslintPluginJest.configs['flat/recommended'].rules,
'jest/expect-expect': 'error',
'jest/no-hooks': 'off',
'jest/prefer-expect-assertions': 'off',
'jest/prefer-lowercase-title': 'off',
'jest/unbound-method': 'off'
}
}
]
export const stylistic: TSESLint.FlatConfig.Config = {
files,
...eslintPluginJest.configs['flat/style'],
rules: {
...eslintPluginJest.configs['flat/style'].rules
}
}