-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
48 lines (46 loc) · 1.23 KB
/
eslint.config.js
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
const eslint = require('@eslint/js')
const tseslint = require('typescript-eslint')
const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended')
const jest = require('eslint-plugin-jest')
const config = tseslint.config(
{
ignores: ['dist', 'lib', 'node_modules', '*.config.js']
},
eslint.configs.recommended,
...tseslint.configs.recommended,
{
files: ['src/**/*.test.ts'],
...jest.configs['flat/recommended'],
rules: {
...jest.configs['flat/recommended'].rules,
'jest/prefer-expect-assertions': 'off'
}
},
{
languageOptions: {
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: true,
tsconfigRootDir: __dirname
}
},
rules: {
'object-shorthand': ['error', 'always'],
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/consistent-type-imports': [
'error',
{disallowTypeAnnotations: false}
],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_'
}
]
}
},
eslintPluginPrettierRecommended
)
module.exports = config