-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
.eslintrc.cjs
56 lines (56 loc) · 1.71 KB
/
.eslintrc.cjs
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
49
50
51
52
53
54
55
56
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['xo', 'prettier', 'plugin:jest/recommended'],
env: {
es6: true,
jest: true,
},
plugins: ['prettier', 'jest'],
rules: {
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/valid-expect': 'error',
'prefer-object-spread': 'off',
'max-nested-callbacks': ['error', 20],
'no-unused-vars': ['warn'],
},
overrides: [
{
files: ['*.spec.js'],
rules: {
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-unsafe-argument': 0,
},
},
{
files: ['*.ts'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
project: ['./packages/*/tsconfig.json'],
},
extends: ['xo-typescript', 'xo', 'prettier', 'plugin:jest/recommended'],
rules: {
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-require-imports': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'warn',
'@typescript-eslint/naming-convention': 0,
'@typescript-eslint/no-redundant-type-constituents': 0,
'prefer-object-spread': 'off',
'no-unused-vars': ['warn'],
},
},
],
globals: {
VERSION: true,
},
};