@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,71 +1,99 @@
1
- import { INDENT_SIZE } from '../constants.js';
2
- import { ERROR, OFF } from '../severity.js';
1
+ import {
2
+ INDENT_SIZE,
3
+ } from "../constants.js";
4
+ import {
5
+ ERROR, OFF,
6
+ } from "../severity.js";
3
7
 
4
8
  export const formattingRules = {
5
- 'vue/block-tag-newline': [
9
+ "vue/block-tag-newline": [
6
10
  ERROR,
7
11
  {
8
- singleline: 'always',
9
- multiline: 'always',
12
+ singleline: "always",
13
+ multiline: "always",
10
14
  maxEmptyLines: 0,
11
15
  },
12
16
  ],
13
17
  // https://github.com/vuejs/eslint-plugin-vue/issues/2380
14
- 'vue/define-macros-order': [OFF],
15
- 'vue/first-attribute-linebreak': [
18
+ "vue/define-macros-order": [
19
+ OFF,
20
+ ],
21
+ "vue/first-attribute-linebreak": [
16
22
  ERROR,
17
23
  {
18
- singleline: 'below',
19
- multiline: 'below',
24
+ singleline: "below",
25
+ multiline: "below",
20
26
  },
21
27
  ],
22
- 'vue/html-closing-bracket-newline': [ERROR],
23
- 'vue/html-closing-bracket-spacing': [ERROR],
24
- 'vue/html-comment-content-newline': [OFF],
25
- 'vue/html-comment-content-spacing': [ERROR],
26
- 'vue/html-comment-indent': [OFF],
27
- 'vue/html-indent': [
28
+ "vue/html-closing-bracket-newline": [
29
+ ERROR,
30
+ ],
31
+ "vue/html-closing-bracket-spacing": [
32
+ ERROR,
33
+ ],
34
+ "vue/html-comment-content-newline": [
35
+ OFF,
36
+ ],
37
+ "vue/html-comment-content-spacing": [
38
+ ERROR,
39
+ ],
40
+ "vue/html-comment-indent": [
41
+ OFF,
42
+ ],
43
+ "vue/html-indent": [
28
44
  ERROR,
29
45
  INDENT_SIZE,
30
46
  ],
31
- 'vue/html-quotes': [
47
+ "vue/html-self-closing": [
32
48
  ERROR,
33
- 'double',
34
49
  ],
35
- 'vue/html-self-closing': [ERROR],
36
- 'vue/max-attributes-per-line': [
50
+ "vue/max-attributes-per-line": [
37
51
  ERROR,
38
52
  {
39
53
  singleline: 1,
40
54
  multiline: 1,
41
55
  },
42
56
  ],
43
- 'vue/multiline-html-element-content-newline': [
57
+ "vue/multiline-html-element-content-newline": [
44
58
  ERROR,
45
59
  {
46
- ignores: ['pre'],
60
+ ignores: [
61
+ "pre",
62
+ ],
47
63
  },
48
64
  ],
49
- 'vue/mustache-interpolation-spacing': [
65
+ "vue/mustache-interpolation-spacing": [
50
66
  ERROR,
51
- 'always',
67
+ "always",
52
68
  ],
53
- 'vue/new-line-between-multi-line-property': [OFF],
54
- 'vue/no-multi-spaces': [ERROR],
55
- 'vue/no-spaces-around-equal-signs-in-attribute': [ERROR],
56
- 'vue/padding-line-between-blocks': [
69
+ "vue/new-line-between-multi-line-property": [
70
+ OFF,
71
+ ],
72
+ "vue/no-multi-spaces": [
73
+ ERROR,
74
+ ],
75
+ "vue/no-spaces-around-equal-signs-in-attribute": [
76
+ ERROR,
77
+ ],
78
+ "vue/padding-line-between-blocks": [
57
79
  ERROR,
58
- 'always',
80
+ "always",
81
+ ],
82
+ "vue/padding-line-between-tags": [
83
+ OFF,
59
84
  ],
60
- 'vue/padding-line-between-tags': [OFF],
61
- 'vue/padding-lines-in-component-definition': [OFF],
62
- 'vue/script-indent': [
63
- 'error',
85
+ "vue/padding-lines-in-component-definition": [
86
+ OFF,
87
+ ],
88
+ "vue/script-indent": [
89
+ "error",
64
90
  INDENT_SIZE,
65
91
  ],
66
- 'vue/singleline-html-element-content-newline': [OFF],
67
- 'vue/v-for-delimiter-style': [
92
+ "vue/singleline-html-element-content-newline": [
93
+ OFF,
94
+ ],
95
+ "vue/v-for-delimiter-style": [
68
96
  ERROR,
69
- 'in',
97
+ "in",
70
98
  ],
71
99
  };
@@ -1,8 +1,18 @@
1
- import { baseRules } from './base.js';
2
- import { extensionRules } from './extension.js';
3
- import { possibleProblemRules } from './possibleProblems.js';
4
- import { suggestionRules } from './suggestions.js';
5
- import { formattingRules } from './formatting.js';
1
+ import {
2
+ baseRules,
3
+ } from "./base.js";
4
+ import {
5
+ extensionRules,
6
+ } from "./extension.js";
7
+ import {
8
+ possibleProblemRules,
9
+ } from "./possibleProblems.js";
10
+ import {
11
+ suggestionRules,
12
+ } from "./suggestions.js";
13
+ import {
14
+ formattingRules,
15
+ } from "./formatting.js";
6
16
 
7
17
  export const vueRules = {
8
18
  ...baseRules,
@@ -1,186 +1,334 @@
1
- import { ERROR, OFF, WARN } from '../severity.js';
1
+ import {
2
+ ERROR, OFF, WARN,
3
+ } from "../severity.js";
2
4
 
3
5
  export const possibleProblemRules = {
4
- 'vue/attribute-hyphenation': [
6
+ "vue/attribute-hyphenation": [
5
7
  ERROR,
6
- 'never',
8
+ "never",
7
9
  ],
8
- 'vue/attributes-order': [ERROR],
9
- 'vue/block-lang': [OFF],
10
- 'vue/block-order': [
10
+ "vue/attributes-order": [
11
+ ERROR,
12
+ ],
13
+ "vue/block-lang": [
14
+ OFF,
15
+ ],
16
+ "vue/block-order": [
11
17
  ERROR,
12
18
  {
13
19
  order: [
14
- 'script',
15
- 'template',
16
- 'style',
20
+ "script",
21
+ "template",
22
+ "style",
17
23
  ],
18
24
  },
19
25
  ],
20
- 'vue/component-api-style': [
26
+ "vue/component-api-style": [
21
27
  ERROR,
22
- ['script-setup'],
28
+ [
29
+ "script-setup",
30
+ ],
23
31
  ],
24
- 'vue/component-definition-name-casing': [
32
+ "vue/component-definition-name-casing": [
25
33
  ERROR,
26
- 'PascalCase',
34
+ "PascalCase",
27
35
  ],
28
- 'vue/component-name-in-template-casing': [
36
+ "vue/component-name-in-template-casing": [
29
37
  ERROR,
30
- 'PascalCase',
38
+ "PascalCase",
31
39
  {
32
40
  registeredComponentsOnly: false,
33
41
  ignores: [],
34
42
  },
35
43
  ],
36
- 'vue/component-options-name-casing': [
44
+ "vue/component-options-name-casing": [
37
45
  ERROR,
38
- 'PascalCase',
46
+ "PascalCase",
39
47
  ],
40
- 'vue/custom-event-name-casing': [
48
+ "vue/custom-event-name-casing": [
41
49
  ERROR,
42
- 'camelCase',
43
- { ignores: ['/^[a-z]+(?:-[a-z]+)*:[a-z]+((\\d)|([A-Z0-9][a-z0-9]+))*([A-Z])?$/u'] },
50
+ "camelCase",
51
+ {
52
+ ignores: [
53
+ "/^[a-z]+(?:-[a-z]+)*:[a-z]+((\\d)|([A-Z0-9][a-z0-9]+))*([A-Z])?$/u",
54
+ ],
55
+ },
56
+ ],
57
+ "vue/define-emits-declaration": [
58
+ ERROR,
59
+ "type-based",
44
60
  ],
45
- 'vue/define-emits-declaration': [
61
+ "vue/define-props-declaration": [
46
62
  ERROR,
47
- 'type-based',
63
+ "type-based",
48
64
  ],
49
- 'vue/define-props-declaration': [
65
+ "vue/html-button-has-type": [
50
66
  ERROR,
51
- 'type-based',
52
67
  ],
53
- 'vue/html-button-has-type': [ERROR],
54
- 'vue/html-end-tags': [ERROR],
55
- 'vue/match-component-file-name': [
68
+ "vue/html-end-tags": [
69
+ ERROR,
70
+ ],
71
+ "vue/match-component-file-name": [
56
72
  ERROR,
57
73
  {
58
- extensions: ['vue'],
74
+ extensions: [
75
+ "vue",
76
+ ],
59
77
  shouldMatchCase: true,
60
78
  },
61
79
  ],
62
- 'vue/multi-word-component-names': [ERROR],
63
- 'vue/next-tick-style': [
80
+ "vue/multi-word-component-names": [
81
+ ERROR,
82
+ ],
83
+ "vue/next-tick-style": [
84
+ ERROR,
85
+ "promise",
86
+ ],
87
+ "vue/no-bare-strings-in-template": [
88
+ OFF,
89
+ ],
90
+ "vue/no-boolean-default": [
91
+ ERROR,
92
+ "default-false",
93
+ ],
94
+ "vue/no-deprecated-scope-attribute": [
95
+ ERROR,
96
+ ],
97
+ "vue/no-deprecated-slot-attribute": [
98
+ ERROR,
99
+ ],
100
+ "vue/no-deprecated-slot-scope-attribute": [
101
+ ERROR,
102
+ ],
103
+ "vue/no-deprecated-v-is": [
104
+ ERROR,
105
+ ],
106
+ "vue/no-duplicate-attr-inheritance": [
107
+ ERROR,
108
+ ],
109
+ "vue/no-empty-component-block": [
110
+ OFF,
111
+ ],
112
+ "vue/no-lifecycle-after-await": [
113
+ ERROR,
114
+ ],
115
+ "vue/no-multiple-objects-in-class": [
116
+ ERROR,
117
+ ],
118
+ "vue/no-mutating-props": [
64
119
  ERROR,
65
- 'promise',
66
120
  ],
67
- 'vue/no-bare-strings-in-template': [OFF],
68
- 'vue/no-boolean-default': [
121
+ "vue/no-potential-component-option-typo": [
69
122
  ERROR,
70
- 'default-false',
71
123
  ],
72
- 'vue/no-deprecated-scope-attribute': [ERROR],
73
- 'vue/no-deprecated-slot-attribute': [ERROR],
74
- 'vue/no-deprecated-slot-scope-attribute': [ERROR],
75
- 'vue/no-deprecated-v-is': [ERROR],
76
- 'vue/no-duplicate-attr-inheritance': [ERROR],
77
- 'vue/no-empty-component-block': [OFF],
78
- 'vue/no-lifecycle-after-await': [ERROR],
79
- 'vue/no-multiple-objects-in-class': [ERROR],
80
- 'vue/no-mutating-props': [ERROR],
81
- 'vue/no-potential-component-option-typo': [ERROR],
82
- 'vue/no-ref-as-operand': [ERROR],
83
- 'vue/no-reserved-component-names': [
124
+ "vue/no-ref-as-operand": [
125
+ ERROR,
126
+ ],
127
+ "vue/no-reserved-component-names": [
84
128
  ERROR,
85
129
  {
86
130
  disallowVueBuiltInComponents: true,
87
131
  disallowVue3BuiltInComponents: true,
88
132
  },
89
133
  ],
90
- 'vue/no-reserved-keys': [ERROR],
91
- 'vue/no-restricted-block': [OFF],
92
- 'vue/no-restricted-call-after-await': [OFF],
93
- 'vue/no-restricted-component-names': [OFF],
94
- 'vue/no-restricted-component-options': [OFF],
95
- 'vue/no-restricted-custom-event': [OFF],
96
- 'vue/no-restricted-html-elements': [OFF],
97
- 'vue/no-restricted-props': [OFF],
98
- 'vue/no-restricted-static-attribute': [OFF],
99
- 'vue/no-restricted-v-bind': [OFF],
100
- 'vue/no-root-v-if': [ERROR],
101
- 'vue/no-setup-props-reactivity-loss': [OFF],
102
- 'vue/no-static-inline-styles': [WARN],
103
- 'vue/no-template-shadow': [OFF],
134
+ "vue/no-reserved-keys": [
135
+ ERROR,
136
+ ],
137
+ "vue/no-restricted-block": [
138
+ OFF,
139
+ ],
140
+ "vue/no-restricted-call-after-await": [
141
+ OFF,
142
+ ],
143
+ "vue/no-restricted-component-names": [
144
+ OFF,
145
+ ],
146
+ "vue/no-restricted-component-options": [
147
+ OFF,
148
+ ],
149
+ "vue/no-restricted-custom-event": [
150
+ OFF,
151
+ ],
152
+ "vue/no-restricted-html-elements": [
153
+ OFF,
154
+ ],
155
+ "vue/no-restricted-props": [
156
+ OFF,
157
+ ],
158
+ "vue/no-restricted-static-attribute": [
159
+ OFF,
160
+ ],
161
+ "vue/no-restricted-v-bind": [
162
+ OFF,
163
+ ],
164
+ "vue/no-root-v-if": [
165
+ ERROR,
166
+ ],
167
+ "vue/no-setup-props-reactivity-loss": [
168
+ OFF,
169
+ ],
170
+ "vue/no-static-inline-styles": [
171
+ WARN,
172
+ ],
173
+ "vue/no-template-shadow": [
174
+ OFF,
175
+ ],
104
176
  // выключено в общих конфигах, может быть включено в вашем репозитории если есть необходимость.
105
- 'vue/no-undef-components': [OFF],
106
- 'vue/no-undef-properties': [ERROR],
107
- 'vue/no-unsupported-features': [
177
+ "vue/no-undef-components": [
178
+ OFF,
179
+ ],
180
+ "vue/no-undef-properties": [
181
+ ERROR,
182
+ ],
183
+ "vue/no-unsupported-features": [
108
184
  ERROR,
109
185
  {
110
- version: '^3.4.27',
186
+ version: "^3.4.27",
111
187
  ignores: [],
112
188
  },
113
189
  ],
114
- 'vue/no-unused-components': [ERROR],
115
- 'vue/no-unused-emit-declarations': [ERROR],
116
- 'vue/no-unused-properties': [
190
+ "vue/no-unused-components": [
191
+ ERROR,
192
+ ],
193
+ "vue/no-unused-emit-declarations": [
194
+ ERROR,
195
+ ],
196
+ "vue/no-unused-properties": [
117
197
  ERROR,
118
198
  {
119
199
  groups: [
120
- 'props',
121
- 'setup',
200
+ "props",
201
+ "setup",
122
202
  ],
123
203
  deepData: true,
124
204
  ignorePublicMembers: true,
125
205
  },
126
206
  ],
127
- 'vue/no-unused-refs': [ERROR],
128
- 'vue/no-unused-vars': [ERROR],
129
- 'vue/no-use-v-else-with-v-for': [ERROR],
130
- 'vue/no-use-v-if-with-v-for': [ERROR],
131
- 'vue/no-useless-mustaches': [ERROR],
132
- 'vue/no-useless-v-bind': [ERROR],
133
- 'vue/no-v-html': [ERROR],
134
- 'vue/no-v-text': [ERROR],
135
- 'vue/no-watch-after-await': [ERROR],
136
- 'vue/one-component-per-file': [ERROR],
137
- 'vue/order-in-components': [ERROR],
138
- 'vue/prefer-define-options': [ERROR],
139
- 'vue/prefer-import-from-vue': [ERROR],
140
- 'vue/prefer-separate-static-class': [ERROR],
141
- 'vue/prefer-true-attribute-shorthand': [
142
- ERROR,
143
- 'always',
144
- ],
145
- 'vue/prop-name-casing': [
146
- ERROR,
147
- 'camelCase',
148
- ],
149
- 'vue/require-default-prop': [OFF],
150
- 'vue/require-direct-export': [ERROR],
151
- 'vue/require-emit-validator': [ERROR],
152
- 'vue/require-explicit-emits': [ERROR],
153
- 'vue/require-expose': [ERROR],
154
- 'vue/require-macro-variable-name': [ERROR],
155
- 'vue/require-name-property': [ERROR],
156
- 'vue/require-prop-comment': [OFF],
157
- 'vue/require-prop-type-constructor': [ERROR],
158
- 'vue/require-prop-types': [ERROR],
159
- 'vue/require-typed-object-prop': [ERROR],
160
- 'vue/require-typed-ref': [ERROR],
161
- 'vue/require-valid-default-prop': [ERROR],
162
- 'vue/sort-keys': [OFF],
163
- 'vue/static-class-names-order': [OFF],
164
- 'vue/this-in-template': [
165
- ERROR,
166
- 'never',
167
- ],
168
- 'vue/use-v-on-exact': [ERROR],
169
- 'vue/v-bind-style': [
170
- ERROR,
171
- 'shorthand',
172
- ],
173
- 'vue/v-on-event-hyphenation': [
174
- ERROR,
175
- 'never',
176
- { autofix: true },
207
+ "vue/no-unused-refs": [
208
+ ERROR,
209
+ ],
210
+ "vue/no-unused-vars": [
211
+ ERROR,
212
+ ],
213
+ "vue/no-use-v-else-with-v-for": [
214
+ ERROR,
215
+ ],
216
+ "vue/no-use-v-if-with-v-for": [
217
+ ERROR,
218
+ ],
219
+ "vue/no-useless-mustaches": [
220
+ ERROR,
221
+ ],
222
+ "vue/no-useless-v-bind": [
223
+ ERROR,
224
+ ],
225
+ "vue/no-v-html": [
226
+ ERROR,
227
+ ],
228
+ "vue/no-v-text": [
229
+ ERROR,
230
+ ],
231
+ "vue/no-watch-after-await": [
232
+ ERROR,
233
+ ],
234
+ "vue/one-component-per-file": [
235
+ ERROR,
236
+ ],
237
+ "vue/order-in-components": [
238
+ ERROR,
239
+ ],
240
+ "vue/prefer-define-options": [
241
+ ERROR,
242
+ ],
243
+ "vue/prefer-import-from-vue": [
244
+ ERROR,
245
+ ],
246
+ "vue/prefer-separate-static-class": [
247
+ ERROR,
248
+ ],
249
+ "vue/prefer-true-attribute-shorthand": [
250
+ ERROR,
251
+ "always",
252
+ ],
253
+ "vue/prop-name-casing": [
254
+ ERROR,
255
+ "camelCase",
256
+ ],
257
+ "vue/require-default-prop": [
258
+ OFF,
259
+ ],
260
+ "vue/require-direct-export": [
261
+ ERROR,
262
+ ],
263
+ "vue/require-emit-validator": [
264
+ ERROR,
265
+ ],
266
+ "vue/require-explicit-emits": [
267
+ ERROR,
268
+ ],
269
+ "vue/require-expose": [
270
+ ERROR,
271
+ ],
272
+ "vue/require-macro-variable-name": [
273
+ ERROR,
274
+ ],
275
+ "vue/require-name-property": [
276
+ ERROR,
277
+ ],
278
+ "vue/require-prop-comment": [
279
+ OFF,
280
+ ],
281
+ "vue/require-prop-type-constructor": [
282
+ ERROR,
283
+ ],
284
+ "vue/require-prop-types": [
285
+ ERROR,
286
+ ],
287
+ "vue/require-typed-object-prop": [
288
+ ERROR,
289
+ ],
290
+ "vue/require-typed-ref": [
291
+ ERROR,
292
+ ],
293
+ "vue/require-valid-default-prop": [
294
+ ERROR,
295
+ ],
296
+ "vue/sort-keys": [
297
+ OFF,
298
+ ],
299
+ "vue/static-class-names-order": [
300
+ OFF,
301
+ ],
302
+ "vue/this-in-template": [
303
+ ERROR,
304
+ "never",
305
+ ],
306
+ "vue/use-v-on-exact": [
307
+ ERROR,
308
+ ],
309
+ "vue/v-bind-style": [
310
+ ERROR,
311
+ "shorthand",
312
+ ],
313
+ "vue/v-on-event-hyphenation": [
314
+ ERROR,
315
+ "never",
316
+ {
317
+ autofix: true,
318
+ },
177
319
  ],
178
320
  // https://github.com/vuejs/eslint-plugin-vue/issues/2571
179
- 'vue/v-on-handler-style': [OFF],
180
- 'vue/v-on-style': [
321
+ "vue/v-on-handler-style": [
322
+ OFF,
323
+ ],
324
+ "vue/v-on-style": [
325
+ ERROR,
326
+ "shorthand",
327
+ ],
328
+ "vue/v-slot-style": [
329
+ ERROR,
330
+ ],
331
+ "vue/valid-define-options": [
181
332
  ERROR,
182
- 'shorthand',
183
333
  ],
184
- 'vue/v-slot-style': [ERROR],
185
- 'vue/valid-define-options': [ERROR],
186
334
  };