@cherepanov.pavel/shareable-config 1.0.13 → 1.0.15

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.
Files changed (50) hide show
  1. package/.editorconfig-get.js +12 -6
  2. package/.get-all.js +18 -12
  3. package/.gitattributes-get.js +12 -6
  4. package/.gitignore-get.js +28 -14
  5. package/.vscode/.code-snippets-get.js +28 -14
  6. package/.vscode/all-files.code-snippets +3 -1
  7. package/.vscode/extensions.json-get.js +26 -12
  8. package/.vscode/settings.json-get.js +26 -12
  9. package/.vscode/vue.code-snippets +1 -1
  10. package/env.json5.set.js +6 -2
  11. package/jsconfig.json +3 -1
  12. package/package.json +3 -3
  13. package/tools/eslint-config/configs/global.js +15 -9
  14. package/tools/eslint-config/configs/javascript.js +13 -7
  15. package/tools/eslint-config/configs/json.js +115 -57
  16. package/tools/eslint-config/configs/typescript.js +17 -9
  17. package/tools/eslint-config/configs/vue.js +41 -17
  18. package/tools/eslint-config/index.js +15 -5
  19. package/tools/eslint-config/rules/constants.js +1 -1
  20. package/tools/eslint-config/rules/javascript/index.js +6 -2
  21. package/tools/eslint-config/rules/javascript/possible-problems.js +193 -75
  22. package/tools/eslint-config/rules/javascript/suggestions.js +450 -225
  23. package/tools/eslint-config/rules/severity.js +3 -3
  24. package/tools/eslint-config/rules/stylistic/index.js +6 -2
  25. package/tools/eslint-config/rules/stylistic/jsFormatting.js +230 -148
  26. package/tools/eslint-config/rules/stylistic/tsFormatting.js +15 -5
  27. package/tools/eslint-config/rules/typescript/common.js +107 -103
  28. package/tools/eslint-config/rules/typescript/compatibility.js +23 -21
  29. package/tools/eslint-config/rules/typescript/extension.js +52 -46
  30. package/tools/eslint-config/rules/typescript/index.js +9 -3
  31. package/tools/eslint-config/rules/vue/base.js +9 -3
  32. package/tools/eslint-config/rules/vue/extension.js +60 -45
  33. package/tools/eslint-config/rules/vue/formatting.js +63 -35
  34. package/tools/eslint-config/rules/vue/index.js +15 -5
  35. package/tools/eslint-config/rules/vue/possibleProblems.js +272 -124
  36. package/tools/eslint-config/rules/vue/suggestions.js +228 -78
  37. package/tools/stylelint-config/config.js +17 -11
  38. package/tools/stylelint-config/rules/base.js +21 -19
  39. package/tools/stylelint-config/rules/conflicts.js +2 -2
  40. package/tools/stylelint-config/rules/order.js +25 -19
  41. package/tools/stylelint-config/rules/property-groups.js +339 -337
  42. package/tools/stylelint-config/rules/scss.js +6 -4
  43. package/tools/stylelint-config/rules/stylistic.js +84 -82
  44. package/utils/communication.js +3 -3
  45. package/utils/copy-with-override.js +31 -12
  46. package/utils/env.js +10 -6
  47. package/utils/file-header.js +10 -8
  48. package/utils/file.js +22 -14
  49. package/utils/lint.js +11 -3
  50. package/utils/merge.js +14 -12
@@ -1,3 +1,3 @@
1
- export const OFF = 'off';
2
- export const WARN = 'warn';
3
- export const ERROR = 'error';
1
+ export const OFF = "off";
2
+ export const WARN = "warn";
3
+ export const ERROR = "error";
@@ -1,2 +1,6 @@
1
- export { default as jsFormatting } from './jsFormatting.js';
2
- export { default as tsFormatting } from './tsFormatting.js';
1
+ export {
2
+ default as jsFormatting,
3
+ } from "./jsFormatting.js";
4
+ export {
5
+ default as tsFormatting,
6
+ } from "./tsFormatting.js";
@@ -1,153 +1,204 @@
1
- import { TAB_WIDTH, MAX_LEN, INDENT_SIZE } from '../constants.js';
2
- import { ERROR, OFF } from '../severity.js';
1
+ import {
2
+ TAB_WIDTH, MAX_LEN, INDENT_SIZE,
3
+ } from "../constants.js";
4
+ import {
5
+ ERROR, OFF,
6
+ } from "../severity.js";
3
7
 
4
8
  /* == formatting rules for javascript == */
5
9
  export default {
6
- '@stylistic/array-bracket-newline': [
10
+ "@stylistic/array-bracket-newline": [
7
11
  ERROR,
8
- { multiline: true, minItems: 2 },
12
+ {
13
+ multiline: true,
14
+ minItems: 1,
15
+ },
9
16
  ],
10
- '@stylistic/array-bracket-spacing': [
17
+ "@stylistic/array-bracket-spacing": [
11
18
  ERROR,
12
- 'never',
19
+ "never",
13
20
  ],
14
- '@stylistic/array-element-newline': [
21
+ "@stylistic/array-element-newline": [
15
22
  ERROR,
16
- { multiline: true, minItems: 2 },
23
+ {
24
+ multiline: true,
25
+ minItems: 1,
26
+ },
17
27
  ],
18
- '@stylistic/arrow-parens': [
28
+ "@stylistic/arrow-parens": [
19
29
  ERROR,
20
- 'always',
30
+ "always",
21
31
  ],
22
- '@stylistic/arrow-spacing': [
32
+ "@stylistic/arrow-spacing": [
23
33
  ERROR,
24
- { before: true, after: true },
34
+ {
35
+ before: true,
36
+ after: true,
37
+ },
25
38
  ],
26
- '@stylistic/block-spacing': [
39
+ "@stylistic/block-spacing": [
27
40
  ERROR,
28
- 'always',
41
+ "always",
29
42
  ],
30
- '@stylistic/brace-style': [
43
+ "@stylistic/brace-style": [
31
44
  ERROR,
32
- '1tbs',
33
- { allowSingleLine: false },
45
+ "1tbs",
46
+ {
47
+ allowSingleLine: false,
48
+ },
49
+ ],
50
+ "@stylistic/comma-dangle": [
51
+ ERROR,
52
+ "always-multiline",
34
53
  ],
35
- '@stylistic/comma-dangle': [
54
+ "@stylistic/comma-spacing": [
36
55
  ERROR,
37
- 'always-multiline',
56
+ {
57
+ before: false,
58
+ after: true,
59
+ },
38
60
  ],
39
- '@stylistic/comma-spacing': [
61
+ "@stylistic/comma-style": [
40
62
  ERROR,
41
- { before: false, after: true },
63
+ "last",
42
64
  ],
43
- '@stylistic/comma-style': [
65
+ "@stylistic/computed-property-spacing": [
44
66
  ERROR,
45
- 'last',
67
+ "never",
46
68
  ],
47
- '@stylistic/computed-property-spacing': [
69
+ "@stylistic/dot-location": [
48
70
  ERROR,
49
- 'never',
71
+ "property",
50
72
  ],
51
- '@stylistic/dot-location': [
73
+ "@stylistic/eol-last": [
52
74
  ERROR,
53
- 'property',
75
+ "always",
54
76
  ],
55
- '@stylistic/eol-last': [
77
+ "@stylistic/function-call-argument-newline": [
56
78
  ERROR,
57
- 'always',
79
+ "consistent",
58
80
  ],
59
- '@stylistic/function-call-argument-newline': [
81
+ "@stylistic/function-call-spacing": [
60
82
  ERROR,
61
- 'consistent',
62
83
  ],
63
- '@stylistic/function-call-spacing': [ERROR],
64
- '@stylistic/function-paren-newline': [
84
+ "@stylistic/function-paren-newline": [
65
85
  ERROR,
66
- 'multiline-arguments',
86
+ "multiline-arguments",
67
87
  ],
68
- '@stylistic/generator-star-spacing': [
88
+ "@stylistic/generator-star-spacing": [
69
89
  ERROR,
70
- { before: false, after: true },
90
+ {
91
+ before: false,
92
+ after: true,
93
+ },
71
94
  ],
72
- '@stylistic/implicit-arrow-linebreak': [
95
+ "@stylistic/implicit-arrow-linebreak": [
73
96
  ERROR,
74
- 'beside',
97
+ "beside",
75
98
  ],
76
- '@stylistic/indent': [
99
+ "@stylistic/indent": [
77
100
  ERROR,
78
101
  INDENT_SIZE,
79
102
  {
80
103
  tabLength: TAB_WIDTH,
81
104
  },
82
105
  ],
83
- '@stylistic/indent-binary-ops': [
106
+ "@stylistic/indent-binary-ops": [
84
107
  ERROR,
85
108
  INDENT_SIZE,
86
109
  ],
87
- '@stylistic/key-spacing': [
110
+ "@stylistic/key-spacing": [
88
111
  ERROR,
89
112
  {
90
113
  beforeColon: false,
91
114
  afterColon: true,
92
- mode: 'strict',
115
+ mode: "strict",
93
116
  },
94
117
  ],
95
- '@stylistic/keyword-spacing': [
118
+ "@stylistic/keyword-spacing": [
96
119
  ERROR,
97
120
  {
98
121
  before: true,
99
122
  after: true,
100
123
  overrides: {
101
- return: { after: true },
102
- throw: { after: true },
103
- case: { after: true },
124
+ return: {
125
+ after: true,
126
+ },
127
+ throw: {
128
+ after: true,
129
+ },
130
+ case: {
131
+ after: true,
132
+ },
104
133
  },
105
134
  },
106
135
  ],
107
- '@stylistic/linebreak-style': [
136
+ "@stylistic/linebreak-style": [
108
137
  ERROR,
109
- 'unix',
138
+ "unix",
139
+ ],
140
+ "@stylistic/lines-around-comment": [
141
+ OFF,
110
142
  ],
111
- '@stylistic/lines-around-comment': [OFF],
112
- '@stylistic/lines-between-class-members': [
143
+ "@stylistic/lines-between-class-members": [
113
144
  ERROR,
114
- 'always',
115
- { exceptAfterSingleLine: false },
145
+ "always",
146
+ {
147
+ exceptAfterSingleLine: false,
148
+ },
116
149
  ],
117
- '@stylistic/max-len': [
150
+ "@stylistic/max-len": [
118
151
  ERROR,
119
152
  MAX_LEN,
120
153
  ],
121
- '@stylistic/max-statements-per-line': [OFF],
122
- '@stylistic/multiline-ternary': [
154
+ "@stylistic/max-statements-per-line": [
155
+ OFF,
156
+ ],
157
+ "@stylistic/multiline-ternary": [
123
158
  ERROR,
124
- 'always-multiline',
159
+ "always-multiline",
125
160
  ],
126
- '@stylistic/new-parens': [
161
+ "@stylistic/new-parens": [
127
162
  ERROR,
128
- 'always',
163
+ "always",
129
164
  ],
130
- '@stylistic/newline-per-chained-call': [
165
+ "@stylistic/newline-per-chained-call": [
131
166
  ERROR,
132
- { ignoreChainWithDepth: 2 },
167
+ {
168
+ ignoreChainWithDepth: 2,
169
+ },
133
170
  ],
134
- '@stylistic/no-confusing-arrow': [
171
+ "@stylistic/no-confusing-arrow": [
135
172
  ERROR,
136
- { allowParens: true },
173
+ {
174
+ allowParens: true,
175
+ },
137
176
  ],
138
- '@stylistic/no-extra-parens': [OFF],
139
- '@stylistic/no-extra-semi': [ERROR],
140
- '@stylistic/no-floating-decimal': [ERROR],
141
- '@stylistic/no-mixed-operators': [
177
+ "@stylistic/no-extra-parens": [
142
178
  OFF,
143
- { allowSamePrecedence: true },
144
179
  ],
145
- '@stylistic/no-mixed-spaces-and-tabs': [ERROR],
146
- '@stylistic/no-multi-spaces': [
180
+ "@stylistic/no-extra-semi": [
147
181
  ERROR,
148
- { ignoreEOLComments: false },
149
182
  ],
150
- '@stylistic/no-multiple-empty-lines': [
183
+ "@stylistic/no-floating-decimal": [
184
+ ERROR,
185
+ ],
186
+ "@stylistic/no-mixed-operators": [
187
+ OFF,
188
+ {
189
+ allowSamePrecedence: true,
190
+ },
191
+ ],
192
+ "@stylistic/no-mixed-spaces-and-tabs": [
193
+ ERROR,
194
+ ],
195
+ "@stylistic/no-multi-spaces": [
196
+ ERROR,
197
+ {
198
+ ignoreEOLComments: false,
199
+ },
200
+ ],
201
+ "@stylistic/no-multiple-empty-lines": [
151
202
  ERROR,
152
203
  {
153
204
  max: 2,
@@ -155,161 +206,192 @@ export default {
155
206
  maxEOF: 0,
156
207
  },
157
208
  ],
158
- '@stylistic/no-tabs': [OFF],
159
- '@stylistic/no-trailing-spaces': [
209
+ "@stylistic/no-tabs": [
210
+ OFF,
211
+ ],
212
+ "@stylistic/no-trailing-spaces": [
160
213
  ERROR,
161
214
  {
162
215
  skipBlankLines: false,
163
216
  ignoreComments: false,
164
217
  },
165
218
  ],
166
- '@stylistic/no-whitespace-before-property': [ERROR],
167
- '@stylistic/nonblock-statement-body-position': [
219
+ "@stylistic/no-whitespace-before-property": [
168
220
  ERROR,
169
- 'beside',
170
221
  ],
171
- '@stylistic/object-curly-newline': [
222
+ "@stylistic/nonblock-statement-body-position": [
223
+ ERROR,
224
+ "beside",
225
+ ],
226
+ "@stylistic/object-curly-newline": [
172
227
  ERROR,
173
228
  {
174
- ObjectExpression: {
175
- minProperties: 4,
176
- multiline: true,
177
- consistent: true,
229
+ "ObjectExpression": {
230
+ multiline: false,
231
+ minProperties: 1,
232
+ },
233
+ "ObjectPattern": {
234
+ multiline: false,
235
+ minProperties: 1,
236
+ },
237
+ "ImportDeclaration": {
238
+ multiline: false,
239
+ minProperties: 1,
240
+ },
241
+ "ExportDeclaration": {
242
+ multiline: false,
243
+ minProperties: 1,
178
244
  },
179
- ObjectPattern: {
180
- minProperties: 4,
181
- multiline: true,
182
- consistent: true,
245
+ "TSTypeLiteral": {
246
+ multiline: false,
247
+ minProperties: 1,
183
248
  },
184
- ImportDeclaration: {
185
- minProperties: 4,
186
- multiline: true,
187
- consistent: true,
249
+ "TSInterfaceBody": {
250
+ multiline: false,
251
+ minProperties: 1,
188
252
  },
189
- ExportDeclaration: {
190
- minProperties: 4,
191
- multiline: true,
192
- consistent: true,
253
+ "TSEnumBody": {
254
+ multiline: false,
255
+ minProperties: 1,
193
256
  },
194
257
  },
195
258
  ],
196
- '@stylistic/object-curly-spacing': [
259
+ "@stylistic/object-curly-spacing": [
197
260
  ERROR,
198
- 'always',
261
+ "never",
199
262
  ],
200
- '@stylistic/object-property-newline': [
263
+ "@stylistic/object-property-newline": [
201
264
  ERROR,
202
- { allowAllPropertiesOnSameLine: true },
265
+ {
266
+ allowAllPropertiesOnSameLine: false,
267
+ },
203
268
  ],
204
- '@stylistic/one-var-declaration-per-line': [
269
+ "@stylistic/one-var-declaration-per-line": [
205
270
  ERROR,
206
- 'always',
271
+ "always",
207
272
  ],
208
- '@stylistic/operator-linebreak': [
273
+ "@stylistic/operator-linebreak": [
209
274
  ERROR,
210
- 'before',
211
- { overrides: { '=': 'none' } },
275
+ "before",
276
+ {
277
+ overrides: {
278
+ "=": "none",
279
+ },
280
+ },
212
281
  ],
213
- '@stylistic/padded-blocks': [
282
+ "@stylistic/padded-blocks": [
214
283
  ERROR,
215
284
  {
216
- blocks: 'never',
217
- classes: 'never',
218
- switches: 'never',
285
+ blocks: "never",
286
+ classes: "never",
287
+ switches: "never",
219
288
  },
220
289
  {
221
290
  allowSingleLineBlocks: false,
222
291
  },
223
292
  ],
224
- '@stylistic/padding-line-between-statements': [OFF],
225
- '@stylistic/quote-props': [
293
+ "@stylistic/padding-line-between-statements": [
294
+ OFF,
295
+ ],
296
+ "@stylistic/quote-props": [
226
297
  ERROR,
227
- 'consistent-as-needed',
298
+ "consistent",
228
299
  ],
229
- '@stylistic/quotes': [
300
+ "@stylistic/quotes": [
230
301
  ERROR,
231
- 'single',
232
- { avoidEscape: true },
302
+ "double",
233
303
  ],
234
- '@stylistic/rest-spread-spacing': [
304
+ "@stylistic/rest-spread-spacing": [
235
305
  ERROR,
236
- 'never',
306
+ "never",
237
307
  ],
238
- '@stylistic/semi': [
308
+ "@stylistic/semi": [
239
309
  ERROR,
240
- 'always',
310
+ "always",
241
311
  ],
242
- '@stylistic/semi-spacing': [
312
+ "@stylistic/semi-spacing": [
243
313
  ERROR,
244
- { before: false, after: true },
314
+ {
315
+ before: false,
316
+ after: true,
317
+ },
245
318
  ],
246
- '@stylistic/semi-style': [
319
+ "@stylistic/semi-style": [
247
320
  ERROR,
248
- 'last',
321
+ "last",
249
322
  ],
250
- '@stylistic/space-before-blocks': [
323
+ "@stylistic/space-before-blocks": [
251
324
  ERROR,
252
- 'always',
325
+ "always",
253
326
  ],
254
- '@stylistic/space-before-function-paren': [
327
+ "@stylistic/space-before-function-paren": [
255
328
  ERROR,
256
329
  {
257
- anonymous: 'always',
258
- named: 'never',
259
- asyncArrow: 'always',
330
+ anonymous: "always",
331
+ named: "never",
332
+ asyncArrow: "always",
260
333
  },
261
334
  ],
262
- '@stylistic/space-in-parens': [
335
+ "@stylistic/space-in-parens": [
336
+ ERROR,
337
+ "never",
338
+ ],
339
+ "@stylistic/space-infix-ops": [
263
340
  ERROR,
264
- 'never',
265
341
  ],
266
- '@stylistic/space-infix-ops': [ERROR],
267
- '@stylistic/space-unary-ops': [
342
+ "@stylistic/space-unary-ops": [
268
343
  ERROR,
269
344
  {
270
345
  words: true,
271
346
  nonwords: false,
272
347
  },
273
348
  ],
274
- '@stylistic/spaced-comment': [
349
+ "@stylistic/spaced-comment": [
275
350
  ERROR,
276
- 'always',
351
+ "always",
277
352
  {
278
353
  line: {
279
354
  exceptions: [
280
- '-',
281
- '+',
355
+ "-",
356
+ "+",
282
357
  ],
283
358
  },
284
359
  block: {
285
360
  exceptions: [
286
- '-',
287
- '+',
361
+ "-",
362
+ "+",
288
363
  ],
289
364
  balanced: true,
290
365
  },
291
366
  },
292
367
  ],
293
- '@stylistic/switch-colon-spacing': [
368
+ "@stylistic/switch-colon-spacing": [
369
+ ERROR,
370
+ {
371
+ after: true,
372
+ before: false,
373
+ },
374
+ ],
375
+ "@stylistic/template-curly-spacing": [
294
376
  ERROR,
295
- { after: true, before: false },
377
+ "never",
296
378
  ],
297
- '@stylistic/template-curly-spacing': [
379
+ "@stylistic/template-tag-spacing": [
298
380
  ERROR,
299
- 'never',
381
+ "never",
300
382
  ],
301
- '@stylistic/template-tag-spacing': [
383
+ "@stylistic/wrap-iife": [
302
384
  ERROR,
303
- 'never',
385
+ "outside",
386
+ {
387
+ functionPrototypeMethods: false,
388
+ },
304
389
  ],
305
- '@stylistic/wrap-iife': [
390
+ "@stylistic/wrap-regex": [
306
391
  ERROR,
307
- 'outside',
308
- { functionPrototypeMethods: false },
309
392
  ],
310
- '@stylistic/wrap-regex': [ERROR],
311
- '@stylistic/yield-star-spacing': [
393
+ "@stylistic/yield-star-spacing": [
312
394
  ERROR,
313
- 'after',
395
+ "after",
314
396
  ],
315
397
  };
@@ -1,9 +1,19 @@
1
- import { ERROR } from '../severity.js';
1
+ import {
2
+ ERROR,
3
+ } from "../severity.js";
2
4
 
3
5
  /* == formatting rules for typescript == */
4
6
  export default {
5
- '@stylistic/member-delimiter-style': [ERROR],
6
- '@stylistic/type-annotation-spacing': [ERROR],
7
- '@stylistic/type-generic-spacing': [ERROR],
8
- '@stylistic/type-named-tuple-spacing': [ERROR],
7
+ "@stylistic/member-delimiter-style": [
8
+ ERROR,
9
+ ],
10
+ "@stylistic/type-annotation-spacing": [
11
+ ERROR,
12
+ ],
13
+ "@stylistic/type-generic-spacing": [
14
+ ERROR,
15
+ ],
16
+ "@stylistic/type-named-tuple-spacing": [
17
+ ERROR,
18
+ ],
9
19
  };