-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
79 lines (79 loc) · 2.45 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
module.exports = {
env: {
browser: true,
es2021: true
},
extends: [
'airbnb',
'react-app',
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'prettier'
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 12,
sourceType: 'module'
},
settings: {
webpack: {},
typescript: {},
'import/ignore': ['node_modules', 'src/js/', 'private_modules'],
'import/parsers': { '@typescript-eslint/parser': ['.ts', '.tsx'] },
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.mjs', '.cjs', '.ts', '.tsx']
}
},
'import/extensions': ['.js', '.jsx', '.ts', '.tsx']
},
plugins: ['react', 'react-hooks', '@typescript-eslint', 'prettier'],
rules: {
// { ts: 'never', tsx: 'never', js: 'never', jsx: 'never' }
'import/extensions': ['error', 'ignorePackages', { ts: 'never', tsx: 'never', js: 'never' }],
'no-console': 0,
'no-plusplus': 0,
'no-bitwise': 'off',
'default-case': 'error',
'no-lonely-if': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'import/no-extraneous-dependencies': [0],
'no-else-return': ['off', { allowElseIf: true }],
'import/no-named-as-default': 0,
'no-param-reassign': ['error', { props: false }],
'react/jsx-props-no-spreading': ['error', { custom: 'ignore' }],
'jsx-a11y/click-events-have-key-events': 2,
'react/no-array-index-key': 0,
'lines-between-class-members': 0,
'react/jsx-filename-extension': ['warn', { extensions: ['.tsx'] }],
'no-shadow': 'off',
'max-len': ['error', { code: 100, ignoreUrls: true }],
'@typescript-eslint/no-shadow': ['error'],
'import/prefer-default-export': 'off',
'react/prop-types': 'off',
'import/no-unresolved': [0],
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react/jsx-fragments': [1, 'element'],
'prettier/prettier': [
'error',
{
printWidth: 100,
bracketSameLine: true,
singleQuote: true,
trailingComma: 'none',
tabWidth: 2
}
],
'arrow-body-style': 'off',
'prefer-arrow-callback': 'off'
},
ignorePatterns: ['src/services/gobang-2.0.0/obsolete/*']
};