-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
.eslintrc.cjs
52 lines (52 loc) 路 1.65 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
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
sourceType: 'module',
ecmaVersion: 7,
ecmaFeatures: { jsx: true, modules: true },
project: ['./tsconfig.lint.json'],
},
extends: [
'xo',
'xo-typescript',
'xo-react',
'prettier',
'plugin:jest/recommended',
'plugin:testing-library/react',
],
env: { es6: true, jest: true, browser: true },
plugins: ['prettier', 'jest', 'simple-import-sort'],
rules: {
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/valid-expect': 'error',
'max-nested-callbacks': ['error', 20],
'default-param-last': 0,
'testing-library/prefer-presence-queries': 'error',
'testing-library/await-async-query': 'warn',
'testing-library/await-async-query': 0,
'react/prop-types': 0,
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/naming-convention': 0,
'@typescript-eslint/member-ordering': 0,
},
globals: { VERSION: true, Cypress: true, cy: true },
overrides: [
{
files: ['*.spec.js', 'packages/test-utils/*.js', '*.js'],
rules: {
'@typescript-eslint/promise-function-async': 0,
'@typescript-eslint/prefer-readonly-parameter-types': 0,
'@typescript-eslint/no-unsafe': 0,
'@typescript-eslint/no-unsafe-argument': 0,
},
},
],
settings: { react: { version: 'detect' } },
};