-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.eslintrc.js
83 lines (83 loc) · 2.18 KB
/
.eslintrc.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['tsconfig.json'],
},
rules: {
'import/named': ['off'],
'import/prefer-default-export': ['off'],
'import/namespace': ['off'],
'import/no-nodejs-modules': ['off'],
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/ban-ts-ignore': ['off'],
'@typescript-eslint/ban-types': ['off'],
'@typescript-eslint/ban-ts-comment': ['off'],
'@typescript-eslint/explicit-module-boundary-types': ['off'],
'@typescript-eslint/no-non-null-assertion': ['off'],
'@typescript-eslint/no-empty-interface': ['off'],
'@typescript-eslint/prefer-optional-chain': ['error'],
'@typescript-eslint/prefer-nullish-coalescing': ['warn'],
'@typescript-eslint/member-delimiter-style': ['off'],
quotes: ['off'],
'arrow-body-style': ['error', 'as-needed'],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
},
],
'react/prop-types': ['off'],
// 'react-hooks/exhaustive-deps': ['off'],
'unicorn/explicit-length-check': ['error'],
'unicorn/no-array-instanceof': ['error'],
'unicorn/throw-new-error': ['error'],
'unicorn/error-message': ['error'],
'react/jsx-sort-props': [
'error',
{
shorthandFirst: true,
},
],
},
extends: [
'eslint:recommended',
'node',
'react-app',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
'plugin:react/recommended',
'plugin:prettier/recommended',
'prettier/react',
],
plugins: [
'jest',
'import',
'react',
'react-hooks',
'@typescript-eslint/eslint-plugin',
'unicorn',
],
globals: {
jest: true,
GIF: true
},
env: {
node: true,
browser: true,
'jest/globals': true,
},
settings: {
react: {
version: 'detect',
},
// Not really core modules, it's just the only way to get extraneous deps warnings ignored since they live
// in the root.
'import/core-modules': [
'@testing-library/react',
'utility-types'
]
},
}