@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,87 +1,237 @@
1
- import { possibleProblemRules } from '../javascript/possible-problems.js';
2
- import { ERROR, OFF } from '../severity.js';
1
+ import {
2
+ possibleProblemRules,
3
+ } from "../javascript/possible-problems.js";
4
+ import {
5
+ ERROR, OFF,
6
+ } from "../severity.js";
3
7
 
4
8
  export const suggestionRules = {
5
- 'vue/match-component-import-name': [ERROR],
9
+ "vue/match-component-import-name": [
10
+ ERROR,
11
+ ],
6
12
  // 'vue/max-lines-per-block': [WARN, {
7
13
  // template: 120,
8
14
  // script: 120,
9
15
  // style: 120,
10
16
  // skipBlankLines: true,
11
17
  // }],
12
- 'vue/no-arrow-functions-in-watch': [ERROR],
13
- 'vue/no-async-in-computed-properties': [ERROR],
14
- 'vue/no-child-content': [ERROR],
15
- 'vue/no-computed-properties-in-data': [ERROR],
16
- 'vue/no-deprecated-data-object-declaration': [ERROR],
17
- 'vue/no-deprecated-destroyed-lifecycle': [ERROR],
18
- 'vue/no-deprecated-dollar-listeners-api': [ERROR],
19
- 'vue/no-deprecated-dollar-scopedslots-api': [ERROR],
20
- 'vue/no-deprecated-events-api': [ERROR],
21
- 'vue/no-deprecated-filter': [ERROR],
22
- 'vue/no-deprecated-functional-template': [ERROR],
23
- 'vue/no-deprecated-html-element-is': [ERROR],
24
- 'vue/no-deprecated-inline-template': [ERROR],
25
- 'vue/no-deprecated-model-definition': [ERROR],
26
- 'vue/no-deprecated-props-default-this': [ERROR],
27
- 'vue/no-deprecated-router-link-tag-prop': [
28
- ERROR,
29
- { components: ['RouterLink'] },
30
- ],
31
- 'vue/no-deprecated-v-bind-sync': [ERROR],
32
- 'vue/no-deprecated-v-on-native-modifier': [ERROR],
33
- 'vue/no-deprecated-v-on-number-modifiers': [ERROR],
34
- 'vue/no-deprecated-vue-config-keycodes': [ERROR],
35
- 'vue/no-dupe-keys': possibleProblemRules['no-dupe-keys'],
36
- 'vue/no-dupe-v-else-if': [ERROR],
37
- 'vue/no-duplicate-attributes': [ERROR],
38
- 'vue/no-export-in-script-setup': [ERROR],
39
- 'vue/no-expose-after-await': [ERROR],
40
- 'vue/no-lone-template': [ERROR],
41
- 'vue/no-multiple-slot-args': [ERROR],
42
- 'vue/no-parsing-error': [ERROR],
43
- 'vue/no-ref-object-reactivity-loss': [ERROR],
44
- 'vue/no-required-prop-with-default': [ERROR],
45
- 'vue/no-reserved-props': [ERROR],
46
- 'vue/no-restricted-class': [OFF],
47
- 'vue/no-shared-component-data': [ERROR],
48
- 'vue/no-side-effects-in-computed-properties': [ERROR],
49
- 'vue/no-template-key': [ERROR],
50
- 'vue/no-template-target-blank': [ERROR],
51
- 'vue/no-textarea-mustache': [ERROR],
52
- 'vue/no-this-in-before-route-enter': [ERROR],
53
- 'vue/no-use-computed-property-like-method': [ERROR],
54
- 'vue/no-useless-template-attributes': [ERROR],
55
- 'vue/no-v-for-template-key-on-child': [ERROR],
56
- 'vue/no-v-text-v-html-on-component': [ERROR],
57
- 'vue/prefer-prop-type-boolean-first': [ERROR],
58
- 'vue/require-component-is': [ERROR],
59
- 'vue/require-render-return': [ERROR],
60
- 'vue/require-slots-as-functions': [ERROR],
61
- 'vue/require-toggle-inside-transition': [ERROR],
62
- 'vue/require-v-for-key': [ERROR],
63
- 'vue/return-in-computed-property': [ERROR],
64
- 'vue/return-in-emits-validator': [ERROR],
65
- 'vue/v-if-else-key': [OFF],
66
- 'vue/valid-attribute-name': [ERROR],
67
- 'vue/valid-define-emits': [ERROR],
68
- 'vue/valid-define-props': [ERROR],
69
- 'vue/valid-next-tick': [ERROR],
70
- 'vue/valid-template-root': [ERROR],
71
- 'vue/valid-v-bind': [ERROR],
72
- 'vue/valid-v-cloak': [ERROR],
73
- 'vue/valid-v-else': [ERROR],
74
- 'vue/valid-v-else-if': [ERROR],
75
- 'vue/valid-v-for': [ERROR],
76
- 'vue/valid-v-html': [ERROR],
77
- 'vue/valid-v-if': [ERROR],
78
- 'vue/valid-v-is': [ERROR],
79
- 'vue/valid-v-memo': [ERROR],
80
- 'vue/valid-v-model': [ERROR],
81
- 'vue/valid-v-on': [ERROR],
82
- 'vue/valid-v-once': [ERROR],
83
- 'vue/valid-v-pre': [ERROR],
84
- 'vue/valid-v-show': [ERROR],
85
- 'vue/valid-v-slot': [ERROR],
86
- 'vue/valid-v-text': [ERROR],
18
+ "vue/no-arrow-functions-in-watch": [
19
+ ERROR,
20
+ ],
21
+ "vue/no-async-in-computed-properties": [
22
+ ERROR,
23
+ ],
24
+ "vue/no-child-content": [
25
+ ERROR,
26
+ ],
27
+ "vue/no-computed-properties-in-data": [
28
+ ERROR,
29
+ ],
30
+ "vue/no-deprecated-data-object-declaration": [
31
+ ERROR,
32
+ ],
33
+ "vue/no-deprecated-destroyed-lifecycle": [
34
+ ERROR,
35
+ ],
36
+ "vue/no-deprecated-dollar-listeners-api": [
37
+ ERROR,
38
+ ],
39
+ "vue/no-deprecated-dollar-scopedslots-api": [
40
+ ERROR,
41
+ ],
42
+ "vue/no-deprecated-events-api": [
43
+ ERROR,
44
+ ],
45
+ "vue/no-deprecated-filter": [
46
+ ERROR,
47
+ ],
48
+ "vue/no-deprecated-functional-template": [
49
+ ERROR,
50
+ ],
51
+ "vue/no-deprecated-html-element-is": [
52
+ ERROR,
53
+ ],
54
+ "vue/no-deprecated-inline-template": [
55
+ ERROR,
56
+ ],
57
+ "vue/no-deprecated-model-definition": [
58
+ ERROR,
59
+ ],
60
+ "vue/no-deprecated-props-default-this": [
61
+ ERROR,
62
+ ],
63
+ "vue/no-deprecated-router-link-tag-prop": [
64
+ ERROR,
65
+ {
66
+ components: [
67
+ "RouterLink",
68
+ ],
69
+ },
70
+ ],
71
+ "vue/no-deprecated-v-bind-sync": [
72
+ ERROR,
73
+ ],
74
+ "vue/no-deprecated-v-on-native-modifier": [
75
+ ERROR,
76
+ ],
77
+ "vue/no-deprecated-v-on-number-modifiers": [
78
+ ERROR,
79
+ ],
80
+ "vue/no-deprecated-vue-config-keycodes": [
81
+ ERROR,
82
+ ],
83
+ "vue/no-dupe-keys": possibleProblemRules["no-dupe-keys"],
84
+ "vue/no-dupe-v-else-if": [
85
+ ERROR,
86
+ ],
87
+ "vue/no-duplicate-attributes": [
88
+ ERROR,
89
+ ],
90
+ "vue/no-export-in-script-setup": [
91
+ ERROR,
92
+ ],
93
+ "vue/no-expose-after-await": [
94
+ ERROR,
95
+ ],
96
+ "vue/no-lone-template": [
97
+ ERROR,
98
+ ],
99
+ "vue/no-multiple-slot-args": [
100
+ ERROR,
101
+ ],
102
+ "vue/no-parsing-error": [
103
+ ERROR,
104
+ ],
105
+ "vue/no-ref-object-reactivity-loss": [
106
+ ERROR,
107
+ ],
108
+ "vue/no-required-prop-with-default": [
109
+ ERROR,
110
+ ],
111
+ "vue/no-reserved-props": [
112
+ ERROR,
113
+ ],
114
+ "vue/no-restricted-class": [
115
+ OFF,
116
+ ],
117
+ "vue/no-shared-component-data": [
118
+ ERROR,
119
+ ],
120
+ "vue/no-side-effects-in-computed-properties": [
121
+ ERROR,
122
+ ],
123
+ "vue/no-template-key": [
124
+ ERROR,
125
+ ],
126
+ "vue/no-template-target-blank": [
127
+ ERROR,
128
+ ],
129
+ "vue/no-textarea-mustache": [
130
+ ERROR,
131
+ ],
132
+ "vue/no-this-in-before-route-enter": [
133
+ ERROR,
134
+ ],
135
+ "vue/no-use-computed-property-like-method": [
136
+ ERROR,
137
+ ],
138
+ "vue/no-useless-template-attributes": [
139
+ ERROR,
140
+ ],
141
+ "vue/no-v-for-template-key-on-child": [
142
+ ERROR,
143
+ ],
144
+ "vue/no-v-text-v-html-on-component": [
145
+ ERROR,
146
+ ],
147
+ "vue/prefer-prop-type-boolean-first": [
148
+ ERROR,
149
+ ],
150
+ "vue/require-component-is": [
151
+ ERROR,
152
+ ],
153
+ "vue/require-render-return": [
154
+ ERROR,
155
+ ],
156
+ "vue/require-slots-as-functions": [
157
+ ERROR,
158
+ ],
159
+ "vue/require-toggle-inside-transition": [
160
+ ERROR,
161
+ ],
162
+ "vue/require-v-for-key": [
163
+ ERROR,
164
+ ],
165
+ "vue/return-in-computed-property": [
166
+ ERROR,
167
+ ],
168
+ "vue/return-in-emits-validator": [
169
+ ERROR,
170
+ ],
171
+ "vue/v-if-else-key": [
172
+ OFF,
173
+ ],
174
+ "vue/valid-attribute-name": [
175
+ ERROR,
176
+ ],
177
+ "vue/valid-define-emits": [
178
+ ERROR,
179
+ ],
180
+ "vue/valid-define-props": [
181
+ ERROR,
182
+ ],
183
+ "vue/valid-next-tick": [
184
+ ERROR,
185
+ ],
186
+ "vue/valid-template-root": [
187
+ ERROR,
188
+ ],
189
+ "vue/valid-v-bind": [
190
+ ERROR,
191
+ ],
192
+ "vue/valid-v-cloak": [
193
+ ERROR,
194
+ ],
195
+ "vue/valid-v-else": [
196
+ ERROR,
197
+ ],
198
+ "vue/valid-v-else-if": [
199
+ ERROR,
200
+ ],
201
+ "vue/valid-v-for": [
202
+ ERROR,
203
+ ],
204
+ "vue/valid-v-html": [
205
+ ERROR,
206
+ ],
207
+ "vue/valid-v-if": [
208
+ ERROR,
209
+ ],
210
+ "vue/valid-v-is": [
211
+ ERROR,
212
+ ],
213
+ "vue/valid-v-memo": [
214
+ ERROR,
215
+ ],
216
+ "vue/valid-v-model": [
217
+ ERROR,
218
+ ],
219
+ "vue/valid-v-on": [
220
+ ERROR,
221
+ ],
222
+ "vue/valid-v-once": [
223
+ ERROR,
224
+ ],
225
+ "vue/valid-v-pre": [
226
+ ERROR,
227
+ ],
228
+ "vue/valid-v-show": [
229
+ ERROR,
230
+ ],
231
+ "vue/valid-v-slot": [
232
+ ERROR,
233
+ ],
234
+ "vue/valid-v-text": [
235
+ ERROR,
236
+ ],
87
237
  };
@@ -1,5 +1,9 @@
1
- import path, { dirname } from 'node:path';
2
- import { fileURLToPath } from 'node:url';
1
+ import path, {
2
+ dirname,
3
+ } from "node:path";
4
+ import {
5
+ fileURLToPath,
6
+ } from "node:url";
3
7
 
4
8
  const currentDir = dirname(fileURLToPath(import.meta.url));
5
9
  const concat = (...arrays) => {
@@ -9,19 +13,21 @@ const concat = (...arrays) => {
9
13
  export default {
10
14
  extends: concat(
11
15
  [
12
- 'stylelint-config-standard',
13
- 'stylelint-config-standard-scss',
14
- 'stylelint-config-standard-vue/scss',
16
+ "stylelint-config-standard",
17
+ "stylelint-config-standard-scss",
18
+ "stylelint-config-standard-vue/scss",
15
19
  ],
16
20
  [
17
- './rules/base.js',
18
- './rules/stylistic.js',
19
- './rules/order.js',
20
- './rules/conflicts.js',
21
- './rules/scss.js',
21
+ "./rules/base.js",
22
+ "./rules/stylistic.js",
23
+ "./rules/order.js",
24
+ "./rules/conflicts.js",
25
+ "./rules/scss.js",
22
26
  ].map((string) => {
23
27
  return path.resolve(currentDir, string);
24
28
  }),
25
29
  ),
26
- plugins: ['@stylistic/stylelint-plugin'],
30
+ plugins: [
31
+ "@stylistic/stylelint-plugin",
32
+ ],
27
33
  };
@@ -1,32 +1,34 @@
1
1
  export default {
2
2
  rules: {
3
- 'color-hex-alpha': 'never',
4
- 'color-hex-length': 'long',
5
- 'color-named': 'never',
6
- 'declaration-no-important': true,
7
- 'declaration-property-value-no-unknown': null,
8
- 'font-family-name-quotes': 'always-unless-keyword',
9
- 'font-family-no-missing-generic-family-keyword': null,
10
- 'font-weight-notation': [
11
- 'numeric',
3
+ "color-hex-alpha": "never",
4
+ "color-hex-length": "long",
5
+ "color-named": "never",
6
+ "declaration-no-important": true,
7
+ "declaration-property-value-no-unknown": null,
8
+ "font-family-name-quotes": "always-unless-keyword",
9
+ "font-family-no-missing-generic-family-keyword": null,
10
+ "font-weight-notation": [
11
+ "numeric",
12
12
  {
13
- ignore: ['relative'],
13
+ ignore: [
14
+ "relative",
15
+ ],
14
16
  },
15
17
  ],
16
- 'max-nesting-depth': [
18
+ "max-nesting-depth": [
17
19
  7,
18
20
  {
19
21
  ignore: [
20
- 'blockless-at-rules',
21
- 'pseudo-classes',
22
+ "blockless-at-rules",
23
+ "pseudo-classes",
22
24
  ],
23
25
  },
24
26
  ],
25
- 'media-feature-name-value-no-unknown': true,
26
- 'no-descending-specificity': null,
27
- 'selector-class-pattern': null,
28
- 'selector-max-compound-selectors': 99,
29
- 'selector-max-id': 0,
30
- 'selector-max-universal': 2,
27
+ "media-feature-name-value-no-unknown": true,
28
+ "no-descending-specificity": null,
29
+ "selector-class-pattern": null,
30
+ "selector-max-compound-selectors": 99,
31
+ "selector-max-id": 0,
32
+ "selector-max-universal": 2,
31
33
  },
32
34
  };
@@ -1,7 +1,7 @@
1
1
  export default {
2
2
  rules: {
3
- 'declaration-empty-line-before': null, // order/properties-order [./order.cjs]
3
+ "declaration-empty-line-before": null, // order/properties-order [./order.cjs]
4
4
  // https://gitlab.kadnk.ru/frontend/configs/-/issues/2
5
- 'length-zero-no-unit': null,
5
+ "length-zero-no-unit": null,
6
6
  },
7
7
  };
@@ -1,41 +1,47 @@
1
- import { propertyGroups } from './property-groups.js';
1
+ import {
2
+ propertyGroups,
3
+ } from "./property-groups.js";
2
4
 
3
5
  export default {
4
- plugins: ['stylelint-order'],
6
+ plugins: [
7
+ "stylelint-order",
8
+ ],
5
9
  rules: {
6
- 'order/order': [
10
+ "order/order": [
7
11
  [
8
- 'dollar-variables',
9
- 'custom-properties',
10
- 'declarations',
12
+ "dollar-variables",
13
+ "custom-properties",
14
+ "declarations",
11
15
  {
12
- type: 'at-rule',
13
- name: 'supports',
16
+ type: "at-rule",
17
+ name: "supports",
14
18
  },
15
- 'rules',
19
+ "rules",
16
20
  {
17
- type: 'at-rule',
18
- name: 'container',
21
+ type: "at-rule",
22
+ name: "container",
19
23
  },
20
24
  {
21
- type: 'at-rule',
22
- name: 'media',
25
+ type: "at-rule",
26
+ name: "media",
23
27
  },
24
28
  ],
25
- { severity: 'error' },
29
+ {
30
+ severity: "error",
31
+ },
26
32
  ],
27
- 'order/properties-order': [
33
+ "order/properties-order": [
28
34
  propertyGroups.map((group) => {
29
35
  return {
30
36
  ...group,
31
- emptyLineBefore: 'always',
37
+ emptyLineBefore: "always",
32
38
  noEmptyLineBetween: true,
33
39
  };
34
40
  }),
35
41
  {
36
- unspecified: 'bottom',
37
- emptyLineBeforeUnspecified: 'always',
38
- severity: 'error',
42
+ unspecified: "bottom",
43
+ emptyLineBeforeUnspecified: "always",
44
+ severity: "error",
39
45
  },
40
46
  ],
41
47
  },