-
Notifications
You must be signed in to change notification settings - Fork 173
/
.eslintrc.js
129 lines (128 loc) · 3.48 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
module.exports = {
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'import',
],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
'prettier/@typescript-eslint',
'prettier/react',
'plugin:prettier/recommended',
],
settings: {
'import/resolver': {
typescript: {
project: ['tsconfig.json', 'tsconfig.spec.json'],
},
node: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
},
},
'import/ignore': ['\\.coffee$', '\\.(scss|less|css)$', '\\.(svg|png|jpe?g|webp|gif)(\\?.*)?$'],
},
globals: {
window: true,
document: true,
process: true,
__DEV__: true,
__SERVER__: true,
},
parserOptions: {
sourceType: 'module',
jsx: true,
useJSXTextNode: true,
ecmaVersion: 2020,
ecmaFeatures: {
jsx: true,
},
},
env: {
es6: true,
browser: true,
node: true,
jest: true,
},
rules: {
'jest/valid-title': 0,
'no-confusing-arrow': 0,
'@typescript-eslint/indent': 0,
'operator-linebreak': 0,
'function-paren-newline': 0,
'no-param-reassign': 0,
'comma-dangle': 0,
'object-curly-newline': 0,
'implicit-arrow-linebreak': 0,
'import/prefer-default-export': 0,
'class-methods-use-this': 0,
'lines-between-class-members': 0,
'quote-props': 0,
'indent': 0,
'no-nested-ternary': 0,
'spaced-comment': ['error', 'always', { markers: ['#region', '#endregion', '/'] }],
'max-len': ['error', { code: 140, ignoreUrls: true }],
'import/no-extraneous-dependencies': 0,
'no-unused-vars': [
'warn',
{
argsIgnorePattern: '^(_|[A-Z]+)',
varsIgnorePattern: '^(_|[A-Z]+)',
},
],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'prettier/prettier': [
'error',
{
parser: 'typescript',
printWidth: 140,
singleQuote: true,
useTabs: false,
tabWidth: 2,
semi: true,
bracketSpacing: true,
trailingComma: 'all',
arrowParens: 'always',
insertPragma: true,
quoteProps: 'consistent',
jsxSingleQuote: false,
jsxBracketSameLine: false,
htmlWhitespaceSensivity: 'css',
proseWrap: 'never',
},
],
'no-empty-function': 0,
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^(_|[A-Z]+)',
varsIgnorePattern: '^(_|[A-Z]+)',
},
],
'react/require-default-props': 0,
'react/jsx-curly-newline': 0,
'no-use-before-define': 0,
'jsx-a11y/anchor-is-valid': 0,
'no-useless-constructor': 0,
'react/jsx-one-expression-per-line': 0,
'react/jsx-wrap-multilines': 0,
'react/prop-types': 0,
'react/static-property-placement': 0,
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx', '.tsx', '.ts'] }],
'react/jsx-props-no-spreading': 0,
// '@typescript-eslint/no-var-requires': 0,
},
};