-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
73 lines (73 loc) · 1.88 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
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'plugin:react/recommended',
'airbnb',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'react',
'eslint-plugin-import-helpers',
],
settings: {
'import/resolver': {
alias: {
map: [
['pages', './pages/'],
['components', './src/components/'],
['containers', './src/containers/'],
['modules', './src/modules/'],
['services', './src/services/'],
['reducers', './src/reducers/'],
['constants', './src/constants/'],
['utils', './src/utils/'],
],
extensions: ['.js', '.jsx'],
},
},
},
rules: {
'import/prefer-default-export': 0,
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'max-len': [2, 120, 2, {
ignoreUrls: true,
ignoreComments: true,
}],
'no-use-before-define': 0,
'react/jsx-props-no-spreading': 0,
'linebreak-style': 0,
'react/no-array-index-key': 0,
'no-underscore-dangle': 0,
'consistent-return': 0,
'no-nested-ternary': 0,
'no-throw-literal': 0,
'react/destructuring-assignment': 0,
'import-helpers/order-imports': [
'warn',
{
newlinesBetween: 'always', // new line between groups
groups: [
'module',
'/^(components|containers|layouts|fields|widgets'
+ '|modules\\/[a-zA-Z-]*$|modules\\/[a-zA-Z-]*\\/(?!constants|utils))/',
'/^(services|hooks|actions|middlewares'
+ '|reducers\\/(?!namespaces|index|actionTypes))/',
'/^(utils|constants|modules\\/[a-zA-Z-]*\\/(constants|utils)'
+ '|reducers\\/(namespaces|index|actionTypes))/',
],
},
],
},
globals: {
PayEngineWidget: false,
},
};