-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
134 lines (133 loc) · 3.5 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
130
131
132
133
134
const path = require('path');
module.exports = {
ignorePatterns: ['*.*ss'],
plugins: [
'@typescript-eslint',
'prettier',
'react',
'import',
'react-hooks',
'sonarjs',
'jsx-a11y'
],
extends: [
'eslint:recommended',
'react-app',
'prettier',
'plugin:prettier/recommended',
'plugin:react/recommended',
'plugin:compat/recommended',
'plugin:sonarjs/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
'plugin:jsx-a11y/recommended'
],
settings: {
'import/resolver': {
node: {
paths: [path.resolve(__dirname, 'src')],
extensions: ['.js', '.jsx', '.ts', '.tsx']
}
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx']
},
react: {
version: 'detect'
}
},
rules: {
semi: [2, 'always'],
quotes: 0,
'consistent-return': 0,
'jsx-quotes': 0,
'react/prop-types': 0,
'react/display-name': 0,
'react/no-array-index-key': 2,
'react/no-children-prop': 2,
'react/no-deprecated': 2,
'react/no-multi-comp': 2,
'react/no-typos': 2,
'react/no-this-in-sfc': 2,
'react/prefer-stateless-function': 2,
'react/no-unsafe': 2,
'react/self-closing-comp': 2,
'react/jsx-fragments': [2, 'element'],
'react/jsx-no-bind': 0,
'react/jsx-no-comment-textnodes': 2,
'react/jsx-no-duplicate-props': 2,
'react/jsx-no-target-blank': 2,
'react/jsx-curly-brace-presence': [2, 'never'],
'react/jsx-boolean-value': [2, 'always'],
'react/jsx-sort-props': [
2,
{
callbacksLast: true,
shorthandLast: true,
ignoreCase: true,
noSortAlphabetically: false,
reservedFirst: true
}
],
'react/jsx-props-no-multi-spaces': 2,
'react/jsx-pascal-case': 2,
'react/jsx-wrap-multilines': [
2,
{
declaration: 'parens-new-line',
assignment: 'parens-new-line',
return: 'parens-new-line',
arrow: 'parens-new-line',
condition: 'parens-new-line',
logical: 'parens-new-line',
prop: 'parens-new-line'
}
],
'import/no-unresolved': 0,
'import/named': 0,
'import/namespace': 2,
'import/default': 2,
'import/export': 2,
'import/no-cycle': 2,
'import/imports-first': [2, 'absolute-first'],
'import/newline-after-import': 2,
'import/prefer-default-export': 0,
'import/no-useless-path-segments': 2,
'import/no-default-export': 2,
'import/no-mutable-exports': 2,
'import/no-namespace': 2,
'import/no-extraneous-dependencies': 0,
'import/no-duplicates': 2,
'import/order': [
2,
{
'newlines-between': 'always',
groups: [
['builtin', 'external'],
['parent', 'internal', 'sibling', 'index', 'unknown']
]
}
],
'no-useless-catch': 0,
'sonarjs/no-useless-catch': 0,
'sonarjs/cognitive-complexity': 0,
'sonarjs/no-duplicated-branches': 0,
'spaced-comment': 0,
'no-empty-function': 2,
'no-useless-constructor': 0,
'lines-between-class-members': 2,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-namespace': 0,
'@typescript-eslint/no-redeclare': 0,
'@typescript-eslint/no-unused-expressions': 0,
'@typescript-eslint/explicit-module-boundary-types': 0
},
env: {
browser: true,
node: true,
jest: true
}
};