@codeleap/config 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +207 -182
- package/package.json +20 -19
package/.eslintrc.js
CHANGED
|
@@ -1,182 +1,207 @@
|
|
|
1
|
-
const formatting = {
|
|
2
|
-
'array-bracket-newline': 'off',
|
|
3
|
-
'array-bracket-spacing': [
|
|
4
|
-
'error',
|
|
5
|
-
'never',
|
|
6
|
-
],
|
|
7
|
-
'array-element-newline': [
|
|
8
|
-
'error',
|
|
9
|
-
'consistent',
|
|
10
|
-
],
|
|
11
|
-
'arrow-parens': 'off',
|
|
12
|
-
'arrow-spacing': [
|
|
13
|
-
'error',
|
|
14
|
-
{
|
|
15
|
-
after: true,
|
|
16
|
-
before: true,
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
|
-
'block-scoped-var': 'warn',
|
|
20
|
-
'block-spacing': [
|
|
21
|
-
'error',
|
|
22
|
-
'always',
|
|
23
|
-
],
|
|
24
|
-
'prefer-rest-params': 'off',
|
|
25
|
-
'brace-style': [
|
|
26
|
-
'error',
|
|
27
|
-
'1tbs',
|
|
28
|
-
{
|
|
29
|
-
allowSingleLine: true,
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
'no-console': 'off',
|
|
33
|
-
'react-hooks/exhaustive-deps': 'off',
|
|
34
|
-
'callback-return': 'error',
|
|
35
|
-
camelcase: 'off',
|
|
36
|
-
'comma-dangle': [
|
|
37
|
-
'warn',
|
|
38
|
-
'always-multiline',
|
|
39
|
-
],
|
|
40
|
-
'comma-spacing': [
|
|
41
|
-
'error',
|
|
42
|
-
{
|
|
43
|
-
after: true,
|
|
44
|
-
before: false,
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
'comma-style': [
|
|
48
|
-
'error',
|
|
49
|
-
'last',
|
|
50
|
-
],
|
|
51
|
-
'computed-property-spacing': [
|
|
52
|
-
'error',
|
|
53
|
-
'never',
|
|
54
|
-
],
|
|
55
|
-
'consistent-this': 'error',
|
|
56
|
-
curly: ['error', 'multi-line'],
|
|
57
|
-
'dot-location': ['warn', 'property'],
|
|
58
|
-
'dot-notation': [
|
|
59
|
-
'warn',
|
|
60
|
-
{
|
|
61
|
-
allowKeywords: true,
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
quotes: ['warn', 'single', {
|
|
65
|
-
avoidEscape: true,
|
|
66
|
-
allowTemplateLiterals: true,
|
|
67
|
-
}],
|
|
68
|
-
'eol-last': 'error',
|
|
69
|
-
eqeqeq: 'off',
|
|
70
|
-
'func-call-spacing': 'error',
|
|
71
|
-
'func-name-matching': 'error',
|
|
72
|
-
'func-names': [
|
|
73
|
-
'error',
|
|
74
|
-
'never',
|
|
75
|
-
],
|
|
76
|
-
'implicit-arrow-linebreak': [
|
|
77
|
-
'warn',
|
|
78
|
-
'beside',
|
|
79
|
-
],
|
|
80
|
-
indent: ['error', 2, {
|
|
81
|
-
SwitchCase: 1,
|
|
82
|
-
}],
|
|
83
|
-
'jsx-quotes': [
|
|
84
|
-
'warn',
|
|
85
|
-
'prefer-single',
|
|
86
|
-
],
|
|
87
|
-
'key-spacing': 'error',
|
|
88
|
-
'keyword-spacing': [
|
|
89
|
-
'error',
|
|
90
|
-
{
|
|
91
|
-
after: true,
|
|
92
|
-
before: true,
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
'linebreak-style': [
|
|
96
|
-
'off',
|
|
97
|
-
],
|
|
98
|
-
'lines-between-class-members': [
|
|
99
|
-
'error',
|
|
100
|
-
'always',
|
|
101
|
-
],
|
|
102
|
-
'max-len': ['warn', { code: 160, tabWidth: 3 }],
|
|
103
|
-
'max-lines': ['warn', {
|
|
104
|
-
max: 250,
|
|
105
|
-
skipComments: true,
|
|
106
|
-
skipBlankLines: true,
|
|
107
|
-
}],
|
|
108
|
-
'max-lines-per-function': 'off',
|
|
109
|
-
'new-parens': 'error',
|
|
110
|
-
'newline-after-var': 'off',
|
|
111
|
-
'newline-before-return': 'off',
|
|
112
|
-
'newline-per-chained-call': [
|
|
113
|
-
'warn',
|
|
114
|
-
{ ignoreChainWithDepth: 3 },
|
|
115
|
-
],
|
|
116
|
-
'func-style': [
|
|
117
|
-
'error',
|
|
118
|
-
'declaration',
|
|
119
|
-
{ allowArrowFunctions: true },
|
|
120
|
-
],
|
|
121
|
-
'no-multiple-empty-lines': ['
|
|
122
|
-
semi: ['error', 'never'],
|
|
123
|
-
'semi-spacing': 'error',
|
|
124
|
-
'semi-style': 'error',
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
'
|
|
129
|
-
'
|
|
130
|
-
'
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
'
|
|
136
|
-
'
|
|
137
|
-
'
|
|
138
|
-
'
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
},
|
|
182
|
-
|
|
1
|
+
const formatting = {
|
|
2
|
+
'array-bracket-newline': 'off',
|
|
3
|
+
'array-bracket-spacing': [
|
|
4
|
+
'error',
|
|
5
|
+
'never',
|
|
6
|
+
],
|
|
7
|
+
'array-element-newline': [
|
|
8
|
+
'error',
|
|
9
|
+
'consistent',
|
|
10
|
+
],
|
|
11
|
+
'arrow-parens': 'off',
|
|
12
|
+
'arrow-spacing': [
|
|
13
|
+
'error',
|
|
14
|
+
{
|
|
15
|
+
after: true,
|
|
16
|
+
before: true,
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
'block-scoped-var': 'warn',
|
|
20
|
+
'block-spacing': [
|
|
21
|
+
'error',
|
|
22
|
+
'always',
|
|
23
|
+
],
|
|
24
|
+
'prefer-rest-params': 'off',
|
|
25
|
+
'brace-style': [
|
|
26
|
+
'error',
|
|
27
|
+
'1tbs',
|
|
28
|
+
{
|
|
29
|
+
allowSingleLine: true,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
'no-console': 'off',
|
|
33
|
+
'react-hooks/exhaustive-deps': 'off',
|
|
34
|
+
'callback-return': 'error',
|
|
35
|
+
camelcase: 'off',
|
|
36
|
+
'comma-dangle': [
|
|
37
|
+
'warn',
|
|
38
|
+
'always-multiline',
|
|
39
|
+
],
|
|
40
|
+
'comma-spacing': [
|
|
41
|
+
'error',
|
|
42
|
+
{
|
|
43
|
+
after: true,
|
|
44
|
+
before: false,
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
'comma-style': [
|
|
48
|
+
'error',
|
|
49
|
+
'last',
|
|
50
|
+
],
|
|
51
|
+
'computed-property-spacing': [
|
|
52
|
+
'error',
|
|
53
|
+
'never',
|
|
54
|
+
],
|
|
55
|
+
'consistent-this': 'error',
|
|
56
|
+
curly: ['error', 'multi-line'],
|
|
57
|
+
'dot-location': ['warn', 'property'],
|
|
58
|
+
'dot-notation': [
|
|
59
|
+
'warn',
|
|
60
|
+
{
|
|
61
|
+
allowKeywords: true,
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
quotes: ['warn', 'single', {
|
|
65
|
+
avoidEscape: true,
|
|
66
|
+
allowTemplateLiterals: true,
|
|
67
|
+
}],
|
|
68
|
+
'eol-last': 'error',
|
|
69
|
+
eqeqeq: 'off',
|
|
70
|
+
'func-call-spacing': 'error',
|
|
71
|
+
'func-name-matching': 'error',
|
|
72
|
+
'func-names': [
|
|
73
|
+
'error',
|
|
74
|
+
'never',
|
|
75
|
+
],
|
|
76
|
+
'implicit-arrow-linebreak': [
|
|
77
|
+
'warn',
|
|
78
|
+
'beside',
|
|
79
|
+
],
|
|
80
|
+
indent: ['error', 2, {
|
|
81
|
+
SwitchCase: 1,
|
|
82
|
+
}],
|
|
83
|
+
'jsx-quotes': [
|
|
84
|
+
'warn',
|
|
85
|
+
'prefer-single',
|
|
86
|
+
],
|
|
87
|
+
'key-spacing': 'error',
|
|
88
|
+
'keyword-spacing': [
|
|
89
|
+
'error',
|
|
90
|
+
{
|
|
91
|
+
after: true,
|
|
92
|
+
before: true,
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
'linebreak-style': [
|
|
96
|
+
'off',
|
|
97
|
+
],
|
|
98
|
+
'lines-between-class-members': [
|
|
99
|
+
'error',
|
|
100
|
+
'always',
|
|
101
|
+
],
|
|
102
|
+
'max-len': ['warn', { code: 160, tabWidth: 3 }],
|
|
103
|
+
'max-lines': ['warn', {
|
|
104
|
+
max: 250,
|
|
105
|
+
skipComments: true,
|
|
106
|
+
skipBlankLines: true,
|
|
107
|
+
}],
|
|
108
|
+
'max-lines-per-function': 'off',
|
|
109
|
+
'new-parens': 'error',
|
|
110
|
+
'newline-after-var': 'off',
|
|
111
|
+
'newline-before-return': 'off',
|
|
112
|
+
'newline-per-chained-call': [
|
|
113
|
+
'warn',
|
|
114
|
+
{ ignoreChainWithDepth: 3 },
|
|
115
|
+
],
|
|
116
|
+
'func-style': [
|
|
117
|
+
'error',
|
|
118
|
+
'declaration',
|
|
119
|
+
{ allowArrowFunctions: true },
|
|
120
|
+
],
|
|
121
|
+
'no-multiple-empty-lines': ['warn', { max: 1, maxBOF: 0, maxEOF: 1 }],
|
|
122
|
+
semi: ['error', 'never'],
|
|
123
|
+
'semi-spacing': 'error',
|
|
124
|
+
'semi-style': 'error',
|
|
125
|
+
'space-before-blocks': 'warn',
|
|
126
|
+
'object-curly-spacing': ['warn', 'always', { 'objectsInObjects': false, 'arraysInObjects': true }],
|
|
127
|
+
'no-trailing-spaces': 'warn',
|
|
128
|
+
'no-whitespace-before-property': 'error',
|
|
129
|
+
// 'space-before-function-paren': ['error', 'never'],
|
|
130
|
+
'space-before-function-paren': ['warn', {
|
|
131
|
+
'anonymous': 'always',
|
|
132
|
+
'named': 'never',
|
|
133
|
+
'asyncArrow': 'always',
|
|
134
|
+
}],
|
|
135
|
+
'space-in-parens': ['warn', 'never'],
|
|
136
|
+
'space-infix-ops': 'warn',
|
|
137
|
+
'no-spaced-func': 'error',
|
|
138
|
+
'no-multi-spaces': 'warn',
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const codeQuality = {
|
|
142
|
+
'global-require': 'off',
|
|
143
|
+
'handle-callback-err': 'warn',
|
|
144
|
+
'callback-return': 'off',
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const typescript = {
|
|
148
|
+
'no-unused-vars': 'off',
|
|
149
|
+
'@typescript-eslint/no-unused-vars': ['warn', { varsIgnorePattern: '_ig|jsx' }],
|
|
150
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
151
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
152
|
+
'@typescript-eslint/ban-ts-comment': 'off',
|
|
153
|
+
'@typescript-eslint/ban-types': 'off',
|
|
154
|
+
'@typescript-eslint/no-empty-function': 'off',
|
|
155
|
+
'@typescript-eslint/semi': ['error', 'never'],
|
|
156
|
+
'@typescript-eslint/member-delimiter-style': ['warn', {
|
|
157
|
+
'multiline': {
|
|
158
|
+
'delimiter': 'none',
|
|
159
|
+
'requireLast': true,
|
|
160
|
+
},
|
|
161
|
+
'singleline': {
|
|
162
|
+
'delimiter': 'semi',
|
|
163
|
+
'requireLast': false,
|
|
164
|
+
},
|
|
165
|
+
'multilineDetection': 'brackets',
|
|
166
|
+
}],
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
module.exports = {
|
|
170
|
+
env: {
|
|
171
|
+
es6: true,
|
|
172
|
+
node: true,
|
|
173
|
+
browser: true,
|
|
174
|
+
},
|
|
175
|
+
parserOptions: {
|
|
176
|
+
ecmaFeatures: {
|
|
177
|
+
jsx: true,
|
|
178
|
+
},
|
|
179
|
+
ecmaVersion: 2018,
|
|
180
|
+
sourceType: 'module',
|
|
181
|
+
},
|
|
182
|
+
extends: [
|
|
183
|
+
'plugin:@typescript-eslint/recommended',
|
|
184
|
+
],
|
|
185
|
+
parser: '@typescript-eslint/parser',
|
|
186
|
+
plugins: [
|
|
187
|
+
'react',
|
|
188
|
+
'react-hooks',
|
|
189
|
+
'@typescript-eslint',
|
|
190
|
+
],
|
|
191
|
+
globals: {
|
|
192
|
+
logger: true,
|
|
193
|
+
warn: true,
|
|
194
|
+
log: true,
|
|
195
|
+
deb: true,
|
|
196
|
+
error: true,
|
|
197
|
+
info: true,
|
|
198
|
+
fetch: true,
|
|
199
|
+
Tools: true,
|
|
200
|
+
__DEV__: true,
|
|
201
|
+
},
|
|
202
|
+
rules: {
|
|
203
|
+
...formatting,
|
|
204
|
+
...codeQuality,
|
|
205
|
+
...typescript,
|
|
206
|
+
},
|
|
207
|
+
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@codeleap/config",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"main": "index.js",
|
|
5
|
-
"license": "
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"@typescript-eslint/
|
|
12
|
-
"
|
|
13
|
-
"eslint
|
|
14
|
-
"eslint-
|
|
15
|
-
"eslint-plugin-
|
|
16
|
-
"eslint-plugin-
|
|
17
|
-
"eslint-plugin-react
|
|
18
|
-
|
|
19
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@codeleap/config",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"repository": "PRIVATE",
|
|
7
|
+
"files": [
|
|
8
|
+
".eslintrc.js"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
|
12
|
+
"@typescript-eslint/parser": "^5.8.1",
|
|
13
|
+
"babel-eslint": "^10.1.0",
|
|
14
|
+
"eslint-import-resolver-alias": "^1.1.2",
|
|
15
|
+
"eslint-plugin-flowtype": "^8.0.3",
|
|
16
|
+
"eslint-plugin-import": "^2.25.3",
|
|
17
|
+
"eslint-plugin-react": "^7.28.0",
|
|
18
|
+
"eslint-plugin-react-hooks": "^4.3.0"
|
|
19
|
+
}
|
|
20
|
+
}
|