@whitetrefoil/eslint-config 0.21.0 → 0.24.0

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/README.md CHANGED
@@ -156,6 +156,24 @@ See Also
156
156
  Changelog
157
157
  =========
158
158
 
159
+ ### v0.24.0
160
+
161
+ * Upgrade rules;
162
+ * Revert changes about "tsconfig.json" in v0.13 since performance of ESLint has been improved;
163
+
164
+ ### v0.23.0
165
+
166
+ * Move parserOption.project from rule presets to full presets;
167
+
168
+ ### v0.22.0
169
+
170
+ * Upgrade rules (mainly ESLint v8);
171
+ * Migrate to Yarn Berry;
172
+
173
+ ### v0.21.1
174
+
175
+ * Consider peer & opt. dependencies when linting implicit dependencies.
176
+
159
177
  ### v0.21.0
160
178
 
161
179
  * Upgrade rules;
package/index.js CHANGED
@@ -14,7 +14,7 @@ module.exports = {
14
14
  ],
15
15
  rules: {
16
16
  // eslint-plugin-implicit-dependencies
17
- 'implicit-dependencies/no-implicit': [2],
17
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
18
18
  },
19
19
  },
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitetrefoil/eslint-config",
3
- "version": "0.21.0",
3
+ "version": "0.24.0",
4
4
  "author": "WhiteTrefoil <whitetrefoil@gmail.com>",
5
5
  "license": "Unlicense",
6
6
  "engines": {
@@ -12,25 +12,26 @@
12
12
  "with-type"
13
13
  ],
14
14
  "dependencies": {
15
- "eslint": "^7.30.0",
15
+ "eslint": "^8.5.0",
16
16
  "eslint-plugin-implicit-dependencies": "^1.1.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@typescript-eslint/eslint-plugin": "^4.28.2",
20
- "@typescript-eslint/parser": "^4.28.2",
19
+ "@typescript-eslint/eslint-plugin": "^5.8.0",
20
+ "@typescript-eslint/parser": "^5.8.0",
21
21
  "eslint-plugin-node": "^11.1.0",
22
- "eslint-plugin-react": "^7.24.0",
23
- "eslint-plugin-react-hooks": "^4.2.0",
24
- "eslint-plugin-vue": "^7.13.0",
25
- "typescript": "^4.3.5"
22
+ "eslint-plugin-react": "^7.28.0",
23
+ "eslint-plugin-react-hooks": "^4.3.0",
24
+ "eslint-plugin-vue": "^8.2.0",
25
+ "typescript": "^4.5.4"
26
26
  },
27
27
  "peerDependencies": {
28
- "@typescript-eslint/eslint-plugin": "^4.28.2",
29
- "@typescript-eslint/parser": "^4.28.2",
28
+ "@typescript-eslint/eslint-plugin": "^5.8.0",
29
+ "@typescript-eslint/parser": "^5.8.0",
30
30
  "eslint-plugin-node": "^11.1.0",
31
- "eslint-plugin-react": "^7.24.0",
32
- "eslint-plugin-react-hooks": "^4.2.0",
33
- "eslint-plugin-vue": "^7.13.0",
34
- "typescript": "^4.3.5"
35
- }
31
+ "eslint-plugin-react": "^7.28.0",
32
+ "eslint-plugin-react-hooks": "^4.3.0",
33
+ "eslint-plugin-vue": "^8.2.0",
34
+ "typescript": "^4.5.4"
35
+ },
36
+ "packageManager": "yarn@3.1.1"
36
37
  }
@@ -1,4 +1,4 @@
1
- // Rules up to v7.30.0
1
+ // Rules up to v8.5.0
2
2
  // @see https://github.com/eslint/eslint/releases
3
3
 
4
4
  module.exports = {
@@ -26,218 +26,268 @@ module.exports = {
26
26
  ],
27
27
 
28
28
  rules: {
29
- // Possible Errors
30
- // ---------------
31
- 'for-direction' : [2],
32
- 'getter-return' : [2],
33
- 'no-async-promise-executor' : [2],
34
- 'no-await-in-loop' : [2],
35
- 'no-compare-neg-zero' : [2],
36
- 'no-cond-assign' : [2],
37
- 'no-console' : [2],
38
- 'no-constant-condition' : [2, { 'checkLoops': false }],
39
- 'no-control-regex' : [2],
40
- 'no-debugger' : [2],
41
- 'no-dupe-args' : [2],
42
- 'no-dupe-else-if' : [2],
43
- 'no-dupe-keys' : [2],
44
- 'no-duplicate-case' : [2],
45
- 'no-empty' : [2],
46
- 'no-empty-character-class' : [2],
47
- 'no-ex-assign' : [2],
48
- 'no-extra-boolean-cast' : [2],
49
- 'no-extra-parens' : [
50
- 1,
51
- 'all',
52
- {
53
- nestedBinaryExpressions : false,
54
- ignoreJSX : 'multi-line',
55
- enforceForNewInMemberExpressions: true,
56
- enforceForArrowConditionals : false,
57
- },
58
- ],
59
- 'no-extra-semi' : [2],
60
- 'no-func-assign' : [2],
61
- 'no-import-assign' : [2],
62
- 'no-inner-declarations' : [2],
63
- 'no-invalid-regexp' : [2],
64
- 'no-irregular-whitespace' : [2],
65
- 'no-loss-of-precision' : [2],
66
- 'no-misleading-character-class': [2],
67
- 'no-obj-calls' : [2],
68
- 'no-promise-executor-return' : [2],
69
- 'no-prototype-builtins' : [2],
70
- 'no-regex-spaces' : [2],
71
- 'no-setter-return' : [2],
72
- 'no-sparse-arrays' : [2],
73
- 'no-template-curly-in-string' : [2],
74
- 'no-unexpected-multiline' : [2],
75
- 'no-unreachable' : [2],
76
- 'no-unreachable-loop' : [2],
77
- 'no-unsafe-finally' : [2],
78
- 'no-unsafe-negation' : [2],
79
- 'no-unsafe-optional-chaining' : [2],
80
- 'no-useless-backreference' : [2],
29
+ // Possible Problems
30
+ // -----------------
31
+ 'array-callback-return' : [1],
32
+ 'constructor-super' : [2],
33
+ 'for-direction' : [2],
34
+ 'getter-return' : [2],
35
+ 'no-async-promise-executor' : [2],
36
+ 'no-await-in-loop' : [2],
37
+ 'no-class-assign' : [2],
38
+ 'no-compare-neg-zero' : [2],
39
+ 'no-cond-assign' : [2],
40
+ 'no-const-assign' : [2],
41
+ 'no-constant-condition' : [2, { 'checkLoops': false }],
42
+ 'no-constructor-return' : [2],
43
+ 'no-control-regex' : [2],
44
+ 'no-debugger' : [2],
45
+ 'no-dupe-args' : [2],
46
+ 'no-dupe-class-members' : [2],
47
+ 'no-dupe-else-if' : [2],
48
+ 'no-dupe-keys' : [2],
49
+ 'no-duplicate-case' : [2],
50
+ 'no-duplicate-imports' : [2],
51
+ 'no-empty-character-class' : [2],
52
+ 'no-empty-pattern' : [2],
53
+ 'no-ex-assign' : [2],
54
+ 'no-fallthrough' : [2],
55
+ 'no-func-assign' : [2],
56
+ 'no-import-assign' : [2],
57
+ 'no-inner-declarations' : [2],
58
+ 'no-invalid-regexp' : [2],
59
+ 'no-irregular-whitespace' : [2],
60
+ 'no-loss-of-precision' : [2],
61
+ 'no-misleading-character-class' : [2],
62
+ 'no-new-symbol' : [2],
63
+ 'no-obj-calls' : [2],
64
+ 'no-promise-executor-return' : [2],
65
+ 'no-prototype-builtins' : [2],
66
+ 'no-self-assign' : [2],
67
+ 'no-self-compare' : [2],
68
+ 'no-setter-return' : [2],
69
+ 'no-sparse-arrays' : [2],
70
+ 'no-template-curly-in-string' : [2],
71
+ 'no-this-before-super' : [2],
72
+ 'no-undef' : [2],
73
+ 'no-unexpected-multiline' : [2],
74
+ 'no-unmodified-loop-condition' : [2],
75
+ 'no-unreachable' : [2],
76
+ 'no-unreachable-loop' : [2],
77
+ 'no-unsafe-finally' : [2],
78
+ 'no-unsafe-negation' : [2],
79
+ 'no-unsafe-optional-chaining' : [2],
80
+ 'no-unused-private-class-members': [1],
81
+ 'no-unused-vars' : [2, { vars: 'all', args: 'none' }],
82
+ 'no-use-before-define' : [2],
83
+ 'no-useless-backreference' : [2],
81
84
  // Waiting for a better rule: https://github.com/eslint/eslint/issues/11899
82
85
  'require-atomic-updates': [0],
83
86
  'use-isnan' : [2],
84
87
  'valid-typeof' : [2],
85
88
 
86
- // Best Practices
87
- // --------------
89
+ // Suggestions
90
+ // -----------
88
91
  'accessor-pairs' : [1],
89
- 'array-callback-return' : [1],
92
+ 'arrow-body-style' : [2, 'as-needed'],
90
93
  'block-scoped-var' : [0],
94
+ 'camelcase' : [2, { properties: 'always' }],
95
+ 'capitalized-comments' : [0],
91
96
  'class-methods-use-this': [0],
92
97
  'complexity' : [0],
93
98
  'consistent-return' : [1],
94
- 'curly' : [2],
95
- 'default-case' : [2],
96
- 'default-case-last' : [2],
97
- 'default-param-last' : [2],
98
- 'dot-location' : [2, 'property'],
99
+ // Just for now, should be change later.
100
+ 'consistent-this' : [1, '_this'],
101
+ 'curly' : [2],
102
+ 'default-case' : [2],
103
+ 'default-case-last' : [2],
104
+ 'default-param-last': [2],
99
105
  // Considering the consistency when acquiring object from API.
100
- 'dot-notation' : [1, { allowKeywords: true, allowPattern: '[_-]' }],
101
- 'eqeqeq' : [2, 'always', { null: 'ignore' }],
106
+ 'dot-notation' : [1, { allowKeywords: true, allowPattern: '[_-]' }],
107
+ 'eqeqeq' : [2, 'always', { null: 'ignore' }],
108
+ 'func-name-matching': [1, 'always'],
109
+ // Not this time.
110
+ 'func-names' : [0],
111
+ 'func-style' : [0],
102
112
  'grouped-accessor-pairs': [1, 'getBeforeSet'],
103
113
  'guard-for-in' : [2],
104
- 'max-classes-per-file' : [0],
105
- 'no-alert' : [2],
106
- 'no-caller' : [2],
107
- 'no-case-declarations' : [2],
108
- 'no-constructor-return' : [2],
109
- 'no-div-regex' : [1],
110
- 'no-else-return' : [1],
111
- 'no-empty-function' : [2],
112
- // Previously we turned this off due to "performance reason".
113
- // We cannot sure if this reason still valid.
114
- // Turn it on (as default) & see what will happen.
115
- 'no-empty-pattern' : [2],
116
- 'no-eq-null' : [0],
117
- 'no-eval' : [2],
118
- 'no-extend-native' : [2],
119
- 'no-extra-bind' : [2],
120
- 'no-extra-label' : [2],
121
- 'no-fallthrough' : [2],
122
- 'no-floating-decimal' : [2],
123
- 'no-global-assign' : [2],
124
- 'no-implicit-coercion' : [1],
125
- 'no-implicit-globals' : [2],
126
- 'no-implied-eval' : [2],
127
- 'no-invalid-this' : [2],
128
- 'no-iterator' : [2],
129
- 'no-labels' : [2],
130
- 'no-lone-blocks' : [2],
131
- 'no-loop-func' : [2],
132
- 'no-magic-numbers' : [
133
- 1,
114
+ 'id-denylist' : [0],
115
+ // Not this time.
116
+ 'id-length' : [0],
117
+ 'id-match' : [0],
118
+ 'init-declarations' : [0],
119
+ 'max-classes-per-file' : [0],
120
+ 'max-depth' : [0],
121
+ 'max-lines' : [0],
122
+ 'max-lines-per-function' : [0],
123
+ 'max-nested-callbacks' : [0],
124
+ 'max-params' : [0],
125
+ 'max-statements' : [0],
126
+ 'multiline-comment-style' : [0],
127
+ 'new-cap' : [0, { capIsNew: true, newIsCap: true }],
128
+ 'no-alert' : [2],
129
+ 'no-array-constructor' : [2],
130
+ 'no-bitwise' : [1],
131
+ 'no-caller' : [2],
132
+ 'no-case-declarations' : [2],
133
+ 'no-confusing-arrow' : [0],
134
+ 'no-console' : [2],
135
+ 'no-continue' : [0],
136
+ 'no-delete-var' : [2],
137
+ 'no-div-regex' : [1],
138
+ 'no-else-return' : [1],
139
+ 'no-empty' : [2],
140
+ 'no-empty-function' : [2],
141
+ 'no-eq-null' : [0],
142
+ 'no-eval' : [2],
143
+ 'no-extend-native' : [2],
144
+ 'no-extra-bind' : [2],
145
+ 'no-extra-boolean-cast' : [2],
146
+ 'no-extra-label' : [2],
147
+ 'no-extra-semi' : [2],
148
+ 'no-floating-decimal' : [2],
149
+ 'no-global-assign' : [2],
150
+ 'no-implicit-coercion' : [1],
151
+ 'no-implicit-globals' : [2],
152
+ 'no-implied-eval' : [2],
153
+ 'no-inline-comments' : [2],
154
+ 'no-invalid-this' : [2],
155
+ 'no-iterator' : [2],
156
+ 'no-label-var' : [2],
157
+ 'no-labels' : [2],
158
+ 'no-lone-blocks' : [2],
159
+ 'no-lonely-if' : [2],
160
+ 'no-loop-func' : [2],
161
+ 'no-magic-numbers' : [
162
+ 0,
134
163
  {
135
164
  // eslint-disable-next-line no-magic-numbers
136
- ignore : [-1, 0, 1],
165
+ ignore : [-1, 0, 1, 60],
137
166
  ignoreArrayIndexes : true,
138
167
  ignoreDefaultValues: true,
139
168
  enforceConst : true,
140
169
  detectObjects : true,
141
170
  },
142
171
  ],
143
- 'no-multi-spaces' : [0],
144
- 'no-multi-str' : [2],
145
- 'no-new' : [1],
146
- 'no-new-func' : [2],
147
- 'no-new-wrappers' : [2],
148
- 'no-nonoctal-decimal-escape' : [1],
149
- 'no-octal' : [2],
150
- 'no-octal-escape' : [2],
151
- 'no-param-reassign' : [1, { props: false }],
152
- 'no-proto' : [2],
153
- 'no-redeclare' : [2],
154
- 'no-restricted-properties' : [0],
155
- 'no-return-assign' : [2, 'always'],
156
- 'no-return-await' : [2],
157
- 'no-script-url' : [1],
158
- 'no-self-assign' : [2],
159
- 'no-self-compare' : [2],
160
- 'no-sequences' : [2],
161
- 'no-throw-literal' : [1],
162
- 'no-unmodified-loop-condition': [2],
163
- 'no-unused-expressions' : [
172
+ 'no-mixed-operators' : [1],
173
+ 'no-multi-assign' : [2],
174
+ 'no-multi-str' : [2],
175
+ 'no-negated-condition' : [0],
176
+ 'no-nested-ternary' : [0],
177
+ 'no-new' : [1],
178
+ 'no-new-func' : [2],
179
+ 'no-new-object' : [2],
180
+ 'no-new-wrappers' : [2],
181
+ 'no-nonoctal-decimal-escape' : [1],
182
+ 'no-octal' : [2],
183
+ 'no-octal-escape' : [2],
184
+ 'no-param-reassign' : [1, { props: false }],
185
+ 'no-plusplus' : [0],
186
+ 'no-proto' : [2],
187
+ 'no-redeclare' : [2],
188
+ 'no-regex-spaces' : [2],
189
+ 'no-restricted-exports' : [0],
190
+ 'no-restricted-globals' : [0],
191
+ 'no-restricted-imports' : [0],
192
+ 'no-restricted-properties' : [0],
193
+ 'no-restricted-syntax' : [0],
194
+ 'no-return-assign' : [2, 'always'],
195
+ 'no-return-await' : [2],
196
+ 'no-script-url' : [1],
197
+ 'no-sequences' : [2],
198
+ 'no-shadow' : [1],
199
+ 'no-shadow-restricted-names' : [2],
200
+ 'no-ternary' : [0],
201
+ 'no-throw-literal' : [1],
202
+ 'no-undef-init' : [2],
203
+ 'no-undefined' : [0],
204
+ 'no-underscore-dangle' : [0],
205
+ 'no-unneeded-ternary' : [2],
206
+ 'no-unused-expressions' : [
164
207
  2, {
165
208
  allowShortCircuit : false,
166
209
  allowTernary : false,
167
210
  allowTaggedTemplates: false,
168
211
  },
169
212
  ],
170
- 'no-unused-labels' : [2],
171
- 'no-useless-call' : [2],
172
- 'no-useless-catch' : [2],
173
- 'no-useless-concat' : [2],
174
- 'no-useless-escape' : [2],
175
- 'no-useless-return' : [1],
176
- 'no-void' : [0],
177
- 'no-warning-comments' : [1, { location: 'anywhere' }],
178
- 'no-with' : [2],
179
- 'prefer-named-capture-group' : [2],
180
- 'prefer-promise-reject-errors': [2, { allowEmptyReject: true }],
181
- 'prefer-regex-literals' : [2],
182
- 'radix' : [2],
183
- 'require-await' : [2],
184
- 'require-unicode-regexp' : [2],
185
- 'vars-on-top' : [0],
186
- 'wrap-iife' : [2],
187
- 'yoda' : [2, 'never', { exceptRange: true }],
188
-
189
-
190
- // Strict Mode
191
- // -----------
192
- 'strict': [2, 'global'],
193
-
194
- // Variables
195
- // ---------
196
- 'init-declarations' : [0],
197
- 'no-delete-var' : [2],
198
- 'no-label-var' : [2],
199
- 'no-restricted-globals' : [0],
200
- 'no-shadow' : [1],
201
- 'no-shadow-restricted-names': [2],
202
- 'no-undef' : [2],
203
- 'no-undef-init' : [2],
204
- 'no-undefined' : [0],
205
- // Change `args` to `"all"` locally to help cleaning dependency injection.
206
- 'no-unused-vars' : [2, { vars: 'all', args: 'none' }],
207
- 'no-use-before-define': [2],
208
-
209
- // Stylistic Issues
210
- // ----------------
213
+ 'no-unused-labels' : [2],
214
+ 'no-useless-call' : [2],
215
+ 'no-useless-catch' : [2],
216
+ 'no-useless-computed-key' : [2],
217
+ 'no-useless-concat' : [2],
218
+ 'no-useless-constructor' : [1],
219
+ 'no-useless-escape' : [2],
220
+ 'no-useless-rename' : [1],
221
+ 'no-useless-return' : [1],
222
+ 'no-var' : [2],
223
+ 'no-void' : [0],
224
+ 'no-warning-comments' : [1, { location: 'anywhere' }],
225
+ 'no-with' : [2],
226
+ 'object-shorthand' : [2, 'always'],
227
+ 'one-var' : [2, 'never'],
228
+ 'one-var-declaration-per-line' : [0],
229
+ 'operator-assignment' : [0],
230
+ 'prefer-arrow-callback' : [0],
231
+ 'prefer-const' : [2],
232
+ 'prefer-destructuring' : [
233
+ 1, {
234
+ VariableDeclarator : {
235
+ array : false,
236
+ object: true,
237
+ },
238
+ AssignmentExpression: {
239
+ array : false,
240
+ object: false,
241
+ },
242
+ },
243
+ ],
244
+ 'prefer-exponentiation-operator': [1],
245
+ 'prefer-named-capture-group' : [2],
246
+ 'prefer-numeric-literals' : [2],
247
+ 'prefer-object-has-own' : [1],
248
+ 'prefer-object-spread' : [1],
249
+ 'prefer-promise-reject-errors' : [2, { allowEmptyReject: true }],
250
+ 'prefer-regex-literals' : [2],
251
+ 'prefer-rest-params' : [1],
252
+ 'prefer-spread' : [2],
253
+ 'prefer-template' : [2],
254
+ 'quote-props' : [2, 'consistent'],
255
+ 'radix' : [2],
256
+ 'require-await' : [2],
257
+ 'require-unicode-regexp' : [2],
258
+ 'require-yield' : [2],
259
+ 'sort-imports' : [0],
260
+ 'sort-keys' : [0],
261
+ 'sort-vars' : [0],
262
+ 'spaced-comment' : [0],
263
+ 'strict' : [2, 'global'],
264
+ 'symbol-description' : [2],
265
+ 'vars-on-top' : [0],
266
+ 'yoda' : [2, 'never', { exceptRange: true }],
211
267
 
268
+ // Layout & Formatting
269
+ // -------------------
212
270
  // Relax below array related rules to allow AngularJS style
213
271
  'array-bracket-newline': [0],
214
272
  'array-bracket-spacing': [1, 'never'],
215
273
  'array-element-newline': [0],
274
+ 'arrow-parens' : [2, 'as-needed'],
275
+ 'arrow-spacing' : [2],
216
276
  'block-spacing' : [2],
217
277
  'brace-style' : [2, '1tbs', { allowSingleLine: true }],
218
- 'camelcase' : [2, { properties: 'always' }],
219
- 'capitalized-comments' : [0],
220
278
  'comma-dangle' : [2, 'always-multiline'],
221
279
  'comma-spacing' : [2],
222
280
  // No need for comma-first style due to allow of extra tailing comma.
223
281
  'comma-style' : [1, 'last'],
224
282
  'computed-property-spacing': [2],
225
- // Just for now, should be change later.
226
- 'consistent-this': [1, '_this'],
283
+ 'dot-location' : [2, 'property'],
227
284
  // Not this time.
228
- 'eol-last' : [1, 'always'],
229
- 'func-call-spacing' : [2, 'never'],
230
- 'func-name-matching': [1, 'always'],
231
- // Not this time.
232
- 'func-names' : [0],
233
- 'func-style' : [0],
285
+ 'eol-last' : [1, 'always'],
286
+ 'func-call-spacing' : [2, 'never'],
234
287
  'function-call-argument-newline': [1, 'consistent'],
235
288
  'function-paren-newline' : [0, 'multiline-arguments'],
236
- 'id-denylist' : [0],
237
- // Not this time.
238
- 'id-length' : [0],
239
- 'id-match' : [0],
240
- 'implicit-arrow-linebreak': [0],
289
+ 'generator-star-spacing' : [2, 'before'],
290
+ 'implicit-arrow-linebreak' : [0],
241
291
  // Leave this to IDEA
242
292
  'indent' : [0, 2, { SwitchCase: 1, ignoreComments: true }],
243
293
  'jsx-quotes' : [0],
@@ -248,115 +298,53 @@ module.exports = {
248
298
  'linebreak-style' : [0],
249
299
  'lines-around-comment' : [0],
250
300
  'lines-between-class-members': [0],
251
- 'max-depth' : [0],
252
301
  'max-len' : [0],
253
- 'max-lines' : [0],
254
- 'max-lines-per-function' : [0],
255
- 'max-nested-callbacks' : [0],
256
- 'max-params' : [0],
257
- 'max-statements' : [0],
258
302
  'max-statements-per-line' : [1, { max: 1 }],
259
- 'multiline-comment-style' : [0],
260
303
  'multiline-ternary' : [0],
261
- 'new-cap' : [0, { capIsNew: true, newIsCap: true }],
262
304
  'new-parens' : [2],
263
305
  'newline-per-chained-call' : [1],
264
- 'no-array-constructor' : [2],
265
- 'no-bitwise' : [1],
266
- 'no-continue' : [0],
267
- 'no-inline-comments' : [0],
268
- 'no-lonely-if' : [2],
306
+ 'no-extra-parens' : [
307
+ 1,
308
+ 'all',
309
+ {
310
+ nestedBinaryExpressions : false,
311
+ ignoreJSX : 'multi-line',
312
+ enforceForNewInMemberExpressions: true,
313
+ enforceForArrowConditionals : false,
314
+ },
315
+ ],
269
316
  'no-mixed-spaces-and-tabs' : [2],
270
- 'no-multi-assign' : [2],
317
+ 'no-multi-spaces' : [0],
271
318
  // Use more than 3 empty lines to mark debug codes.
272
319
  // eslint-disable-next-line no-magic-numbers
273
320
  'no-multiple-empty-lines' : [2, { max: 3, maxEOF: 1 }],
274
- 'no-negated-condition' : [0],
275
- 'no-nested-ternary' : [0],
276
- 'no-new-object' : [2],
277
- 'no-plusplus' : [0],
278
- 'no-restricted-syntax' : [0],
279
321
  'no-tabs' : [2],
280
- 'no-ternary' : [0],
281
322
  'no-trailing-spaces' : [2],
282
- 'no-underscore-dangle' : [0],
283
- 'no-unneeded-ternary' : [2],
284
323
  'no-whitespace-before-property' : [2],
285
324
  'nonblock-statement-body-position': [0],
286
325
  'object-curly-newline' : [2, { consistent: true }],
287
326
  'object-curly-spacing' : [2, 'always'],
288
327
  'object-property-newline' : [0],
289
- 'one-var' : [2, 'never'],
290
- 'one-var-declaration-per-line' : [0],
291
- 'operator-assignment' : [0],
292
328
  // Not this time.
293
329
  'operator-linebreak' : [0],
294
330
  'padded-blocks' : [0],
295
331
  'padding-line-between-statements': [0],
296
- 'prefer-exponentiation-operator' : [1],
297
- 'prefer-object-spread' : [1],
298
- 'quote-props' : [2, 'consistent'],
299
332
  'quotes' : [2, 'single', { avoidEscape: true }],
333
+ 'rest-spread-spacing' : [2],
300
334
  'semi' : [2, 'never'],
301
335
  'semi-spacing' : [2, { before: false, after: true }],
302
336
  'semi-style' : [0, 'last'],
303
- 'sort-keys' : [0],
304
- 'sort-vars' : [0],
305
337
  'space-before-blocks' : [2, 'always'],
306
338
  'space-before-function-paren' : [2, 'never'],
307
339
  'space-in-parens' : [2, 'never'],
308
340
  'space-infix-ops' : [2, { int32Hint: true }],
309
341
  'space-unary-ops' : [2, { words: true, nonwords: false }],
310
- 'spaced-comment' : [0],
311
342
  'switch-colon-spacing' : [1],
312
343
  'template-curly-spacing' : [1],
344
+ 'template-tag-spacing' : [2],
313
345
  'unicode-bom' : [2],
346
+ 'wrap-iife' : [2],
314
347
  'wrap-regex' : [0],
315
-
316
- // ECMAScript 6
317
- // ------------
318
- 'arrow-body-style' : [2, 'as-needed'],
319
- 'arrow-parens' : [2, 'as-needed'],
320
- 'arrow-spacing' : [2],
321
- 'constructor-super' : [2],
322
- 'generator-star-spacing' : [2, 'before'],
323
- 'no-class-assign' : [2],
324
- 'no-confusing-arrow' : [0],
325
- 'no-const-assign' : [2],
326
- 'no-dupe-class-members' : [2],
327
- 'no-duplicate-imports' : [2],
328
- 'no-new-symbol' : [2],
329
- 'no-restricted-exports' : [0],
330
- 'no-restricted-imports' : [0],
331
- 'no-this-before-super' : [2],
332
- 'no-useless-computed-key': [2],
333
- 'no-useless-constructor' : [1],
334
- 'no-useless-rename' : [1],
335
- 'no-var' : [2],
336
- 'object-shorthand' : [2, 'always'],
337
- 'prefer-arrow-callback' : [0],
338
- 'prefer-const' : [2],
339
- 'prefer-destructuring' : [
340
- 1, {
341
- VariableDeclarator : {
342
- array : false,
343
- object: true,
344
- },
345
- AssignmentExpression: {
346
- array : false,
347
- object: false,
348
- },
349
- },
350
- ],
351
- 'prefer-numeric-literals': [2],
352
- 'prefer-rest-params' : [1],
353
- 'prefer-spread' : [2],
354
- 'prefer-template' : [2],
355
- 'require-yield' : [2],
356
- 'rest-spread-spacing' : [2],
357
- 'sort-imports' : [0],
358
- 'symbol-description' : [2],
359
- 'template-tag-spacing' : [2],
360
- 'yield-star-spacing' : [2, 'before'],
348
+ 'yield-star-spacing' : [2, 'before'],
361
349
  },
362
350
  }
@@ -1,4 +1,4 @@
1
- // Rules up to v7.24.0
1
+ // Rules up to v7.28.0
2
2
  // @see https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md
3
3
 
4
4
  module.exports = {
@@ -20,11 +20,10 @@ module.exports = {
20
20
  extends: [
21
21
  'plugin:react/recommended',
22
22
  'plugin:react-hooks/recommended',
23
+ 'plugin:react/jsx-runtime',
23
24
  ],
24
25
 
25
26
  rules: {
26
- 'react/jsx-uses-react' : [0],
27
- 'react/react-in-jsx-scope' : [0],
28
27
  'react/prop-types' : [0],
29
28
  'react-hooks/rules-of-hooks' : [2],
30
29
  'react-hooks/exhaustive-deps': [2],
@@ -1,4 +1,4 @@
1
- // Rules up to v4.28.0
1
+ // Rules up to v5.8.0
2
2
  // @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md
3
3
 
4
4
  // These are rules don't need type info
@@ -141,7 +141,6 @@ module.exports = {
141
141
  '@typescript-eslint/no-require-imports' : [2],
142
142
  '@typescript-eslint/no-this-alias' : [1],
143
143
  '@typescript-eslint/no-type-alias' : [0],
144
- '@typescript-eslint/no-unused-vars-experimental' : [0],
145
144
  '@typescript-eslint/no-var-requires' : [2],
146
145
  '@typescript-eslint/prefer-as-const' : [2],
147
146
  '@typescript-eslint/prefer-enum-initializers' : [0],
@@ -1,18 +1,12 @@
1
- // Rules up to v4.28.0
1
+ // Rules up to v5.8.0
2
2
  // @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md
3
3
 
4
4
  // These are rules need type info which will be much slower
5
5
 
6
6
  module.exports = {
7
-
8
- parserOptions: {
9
- project: [
10
- 'tsconfig.eslint.json',
11
- ],
12
- },
13
-
14
7
  rules: {
15
8
  '@typescript-eslint/await-thenable' : [1],
9
+ '@typescript-eslint/consistent-type-exports' : [1],
16
10
  '@typescript-eslint/no-base-to-string' : [2],
17
11
  '@typescript-eslint/no-confusing-void-expression' : [
18
12
  2,
@@ -23,6 +17,7 @@ module.exports = {
23
17
  ],
24
18
  '@typescript-eslint/no-floating-promises' : [1],
25
19
  '@typescript-eslint/no-for-in-array' : [2],
20
+ '@typescript-eslint/no-meaningless-void-operator' : [1],
26
21
  '@typescript-eslint/no-implied-eval' : [2],
27
22
  '@typescript-eslint/no-misused-promises' : [
28
23
  2, {
@@ -48,6 +43,7 @@ module.exports = {
48
43
  '@typescript-eslint/prefer-readonly-parameter-types': [0],
49
44
  '@typescript-eslint/prefer-reduce-type-parameter' : [0],
50
45
  '@typescript-eslint/prefer-regexp-exec' : [1],
46
+ '@typescript-eslint/prefer-return-this-type' : [2],
51
47
  '@typescript-eslint/prefer-string-starts-ends-with' : [1],
52
48
  '@typescript-eslint/promise-function-async' : [2],
53
49
  '@typescript-eslint/require-array-sort-compare' : [2],
package/react-semi.js CHANGED
@@ -16,7 +16,7 @@ module.exports = {
16
16
  ],
17
17
  rules: {
18
18
  // eslint-plugin-implicit-dependencies
19
- 'implicit-dependencies/no-implicit': [2],
19
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
20
20
  },
21
21
  },
22
22
 
package/react.js CHANGED
@@ -16,7 +16,7 @@ module.exports = {
16
16
  ],
17
17
  rules: {
18
18
  // eslint-plugin-implicit-dependencies
19
- 'implicit-dependencies/no-implicit': [2],
19
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
20
20
  },
21
21
  },
22
22
 
package/semi.js CHANGED
@@ -14,7 +14,7 @@ module.exports = {
14
14
  ],
15
15
  rules: {
16
16
  // eslint-plugin-implicit-dependencies
17
- 'implicit-dependencies/no-implicit': [2],
17
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
18
18
  },
19
19
  },
20
20
 
package/vue-semi.js CHANGED
@@ -14,7 +14,7 @@ module.exports = {
14
14
  ],
15
15
  rules: {
16
16
  // eslint-plugin-implicit-dependencies
17
- 'implicit-dependencies/no-implicit': [2],
17
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
18
18
  },
19
19
  },
20
20
 
package/vue.js CHANGED
@@ -14,7 +14,7 @@ module.exports = {
14
14
  ],
15
15
  rules: {
16
16
  // eslint-plugin-implicit-dependencies
17
- 'implicit-dependencies/no-implicit': [2],
17
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
18
18
  },
19
19
  },
20
20
 
package/vue3-semi.js CHANGED
@@ -14,7 +14,7 @@ module.exports = {
14
14
  ],
15
15
  rules: {
16
16
  // eslint-plugin-implicit-dependencies
17
- 'implicit-dependencies/no-implicit': [2],
17
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
18
18
  },
19
19
  },
20
20
 
package/vue3.js CHANGED
@@ -14,7 +14,7 @@ module.exports = {
14
14
  ],
15
15
  rules: {
16
16
  // eslint-plugin-implicit-dependencies
17
- 'implicit-dependencies/no-implicit': [2],
17
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
18
18
  },
19
19
  },
20
20
 
@@ -6,6 +6,14 @@ module.exports = {
6
6
  '../presets/js',
7
7
  ],
8
8
 
9
+ parserOptions: {
10
+ project: [
11
+ '**/tsconfig.json',
12
+ '**/tsconfig.eslint.json',
13
+ '!**/node_modules/**',
14
+ ],
15
+ },
16
+
9
17
  overrides: [
10
18
  {
11
19
  files: [
@@ -14,7 +22,7 @@ module.exports = {
14
22
  ],
15
23
  rules: {
16
24
  // eslint-plugin-implicit-dependencies
17
- 'implicit-dependencies/no-implicit': [2],
25
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
18
26
  },
19
27
  },
20
28
 
@@ -7,6 +7,14 @@ module.exports = {
7
7
  '../presets/node',
8
8
  ],
9
9
 
10
+ parserOptions: {
11
+ project: [
12
+ '**/tsconfig.json',
13
+ '**/tsconfig.eslint.json',
14
+ '!**/node_modules/**',
15
+ ],
16
+ },
17
+
10
18
  overrides: [
11
19
  {
12
20
  files : ['**/*.ts'],
package/with-type/node.js CHANGED
@@ -7,6 +7,14 @@ module.exports = {
7
7
  '../presets/node',
8
8
  ],
9
9
 
10
+ parserOptions: {
11
+ project: [
12
+ '**/tsconfig.json',
13
+ '**/tsconfig.eslint.json',
14
+ '!**/node_modules/**',
15
+ ],
16
+ },
17
+
10
18
  overrides: [
11
19
  {
12
20
  files : ['**/*.ts'],
@@ -6,6 +6,14 @@ module.exports = {
6
6
  '../presets/js/semi',
7
7
  ],
8
8
 
9
+ parserOptions: {
10
+ project: [
11
+ '**/tsconfig.json',
12
+ '**/tsconfig.eslint.json',
13
+ '!**/node_modules/**',
14
+ ],
15
+ },
16
+
9
17
  overrides: [
10
18
  {
11
19
  files: [
@@ -16,7 +24,7 @@ module.exports = {
16
24
  ],
17
25
  rules: {
18
26
  // eslint-plugin-implicit-dependencies
19
- 'implicit-dependencies/no-implicit': [2],
27
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
20
28
  },
21
29
  },
22
30
 
@@ -6,6 +6,14 @@ module.exports = {
6
6
  '../presets/js',
7
7
  ],
8
8
 
9
+ parserOptions: {
10
+ project: [
11
+ '**/tsconfig.json',
12
+ '**/tsconfig.eslint.json',
13
+ '!**/node_modules/**',
14
+ ],
15
+ },
16
+
9
17
  overrides: [
10
18
  {
11
19
  files: [
@@ -16,7 +24,7 @@ module.exports = {
16
24
  ],
17
25
  rules: {
18
26
  // eslint-plugin-implicit-dependencies
19
- 'implicit-dependencies/no-implicit': [2],
27
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
20
28
  },
21
29
  },
22
30
 
package/with-type/semi.js CHANGED
@@ -6,6 +6,14 @@ module.exports = {
6
6
  '../presets/js/semi',
7
7
  ],
8
8
 
9
+ parserOptions: {
10
+ project: [
11
+ '**/tsconfig.json',
12
+ '**/tsconfig.eslint.json',
13
+ '!**/node_modules/**',
14
+ ],
15
+ },
16
+
9
17
  overrides: [
10
18
  {
11
19
  files: [
@@ -14,7 +22,7 @@ module.exports = {
14
22
  ],
15
23
  rules: {
16
24
  // eslint-plugin-implicit-dependencies
17
- 'implicit-dependencies/no-implicit': [2],
25
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
18
26
  },
19
27
  },
20
28
 
@@ -6,6 +6,14 @@ module.exports = {
6
6
  '../presets/js/semi',
7
7
  ],
8
8
 
9
+ parserOptions: {
10
+ project: [
11
+ '**/tsconfig.json',
12
+ '**/tsconfig.eslint.json',
13
+ '!**/node_modules/**',
14
+ ],
15
+ },
16
+
9
17
  overrides: [
10
18
  {
11
19
  files: [
@@ -14,7 +22,7 @@ module.exports = {
14
22
  ],
15
23
  rules: {
16
24
  // eslint-plugin-implicit-dependencies
17
- 'implicit-dependencies/no-implicit': [2],
25
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
18
26
  },
19
27
  },
20
28
 
package/with-type/vue.js CHANGED
@@ -6,6 +6,14 @@ module.exports = {
6
6
  '../presets/js',
7
7
  ],
8
8
 
9
+ parserOptions: {
10
+ project: [
11
+ '**/tsconfig.json',
12
+ '**/tsconfig.eslint.json',
13
+ '!**/node_modules/**',
14
+ ],
15
+ },
16
+
9
17
  overrides: [
10
18
  {
11
19
  files: [
@@ -14,7 +22,7 @@ module.exports = {
14
22
  ],
15
23
  rules: {
16
24
  // eslint-plugin-implicit-dependencies
17
- 'implicit-dependencies/no-implicit': [2],
25
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
18
26
  },
19
27
  },
20
28
 
@@ -6,6 +6,14 @@ module.exports = {
6
6
  '../presets/js/semi',
7
7
  ],
8
8
 
9
+ parserOptions: {
10
+ project: [
11
+ '**/tsconfig.json',
12
+ '**/tsconfig.eslint.json',
13
+ '!**/node_modules/**',
14
+ ],
15
+ },
16
+
9
17
  overrides: [
10
18
  {
11
19
  files: [
@@ -14,7 +22,7 @@ module.exports = {
14
22
  ],
15
23
  rules: {
16
24
  // eslint-plugin-implicit-dependencies
17
- 'implicit-dependencies/no-implicit': [2],
25
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
18
26
  },
19
27
  },
20
28
 
package/with-type/vue3.js CHANGED
@@ -6,6 +6,14 @@ module.exports = {
6
6
  '../presets/js',
7
7
  ],
8
8
 
9
+ parserOptions: {
10
+ project: [
11
+ '**/tsconfig.json',
12
+ '**/tsconfig.eslint.json',
13
+ '!**/node_modules/**',
14
+ ],
15
+ },
16
+
9
17
  overrides: [
10
18
  {
11
19
  files: [
@@ -14,7 +22,7 @@ module.exports = {
14
22
  ],
15
23
  rules: {
16
24
  // eslint-plugin-implicit-dependencies
17
- 'implicit-dependencies/no-implicit': [2],
25
+ 'implicit-dependencies/no-implicit': [2, { peer: true, optional: true }],
18
26
  },
19
27
  },
20
28