@alexlit/lint-kit 103.0.0 → 105.0.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.
Files changed (146) hide show
  1. package/.lintstagedrc.js +1 -2
  2. package/.markdownlintrc.js +1 -1
  3. package/.stylelintrc.js +1 -4
  4. package/README.md +1 -1
  5. package/package.json +16 -14
  6. package/packages/config-commitlint/CHANGELOG.md +7 -0
  7. package/packages/config-commitlint/README.md +28 -0
  8. package/packages/config-commitlint/index.js +3 -0
  9. package/packages/config-commitlint/package.json +38 -0
  10. package/packages/config-eslint/CHANGELOG.md +37 -0
  11. package/packages/config-eslint/README.md +69 -0
  12. package/packages/config-eslint/TODO.md +6 -0
  13. package/packages/config-eslint/dictionaries/index.js +462 -0
  14. package/packages/config-eslint/dictionaries/programming/bash.js +25 -0
  15. package/packages/config-eslint/dictionaries/programming/django.js +2345 -0
  16. package/packages/config-eslint/dictionaries/programming/elixir.js +64 -0
  17. package/packages/config-eslint/dictionaries/programming/go.js +7748 -0
  18. package/packages/config-eslint/dictionaries/programming/java.js +33527 -0
  19. package/packages/config-eslint/dictionaries/programming/latex.js +675 -0
  20. package/packages/config-eslint/dictionaries/programming/lua.js +394 -0
  21. package/packages/config-eslint/dictionaries/programming/php.js +9788 -0
  22. package/packages/config-eslint/dictionaries/programming/python.js +367 -0
  23. package/packages/config-eslint/dictionaries/programming/ruby.js +357 -0
  24. package/packages/config-eslint/dictionaries/programming/rust.js +115 -0
  25. package/packages/config-eslint/dictionaries/programming/scala.js +2755 -0
  26. package/packages/config-eslint/dictionaries/specialized/html-symbol-entities.js +1118 -0
  27. package/packages/config-eslint/dictionaries/specialized/lorem-ipsum.js +359 -0
  28. package/packages/config-eslint/index.js +225 -0
  29. package/packages/config-eslint/package.json +87 -0
  30. package/packages/config-eslint/plugins/array-func.js +21 -0
  31. package/packages/config-eslint/plugins/compat.js +8 -0
  32. package/packages/config-eslint/plugins/decorator-position.js +16 -0
  33. package/packages/config-eslint/plugins/eslint-comments.js +10 -0
  34. package/packages/config-eslint/plugins/etc.js +14 -0
  35. package/packages/config-eslint/plugins/ext.js +13 -0
  36. package/packages/config-eslint/plugins/filenames.js +39 -0
  37. package/packages/config-eslint/plugins/import.js +72 -0
  38. package/packages/config-eslint/plugins/jsdoc.js +33 -0
  39. package/packages/config-eslint/plugins/jsx-a11y.js +6 -0
  40. package/packages/config-eslint/plugins/lit-a11y.js +6 -0
  41. package/packages/config-eslint/plugins/lit.js +10 -0
  42. package/packages/config-eslint/plugins/more.js +18 -0
  43. package/packages/config-eslint/plugins/no-await-in-promise.js +6 -0
  44. package/packages/config-eslint/plugins/no-constructor-bind.js +9 -0
  45. package/packages/config-eslint/plugins/no-explicit-type-exports.js +8 -0
  46. package/packages/config-eslint/plugins/no-inferred-method-name.js +8 -0
  47. package/packages/config-eslint/plugins/no-loops.js +8 -0
  48. package/packages/config-eslint/plugins/no-secrets.js +13 -0
  49. package/packages/config-eslint/plugins/no-use-extend-native.js +6 -0
  50. package/packages/config-eslint/plugins/nuxt.js +10 -0
  51. package/packages/config-eslint/plugins/optional/node.js +6 -0
  52. package/packages/config-eslint/plugins/prettier.js +25 -0
  53. package/packages/config-eslint/plugins/promise.js +11 -0
  54. package/packages/config-eslint/plugins/quasar.js +6 -0
  55. package/packages/config-eslint/plugins/regexp.js +8 -0
  56. package/packages/config-eslint/plugins/security.js +11 -0
  57. package/packages/config-eslint/plugins/simple-import-sort.js +9 -0
  58. package/packages/config-eslint/plugins/sonar.js +6 -0
  59. package/packages/config-eslint/plugins/sort-class-members.js +299 -0
  60. package/packages/config-eslint/plugins/sort-destructure-keys.js +11 -0
  61. package/packages/config-eslint/plugins/sort-keys-fix.js +8 -0
  62. package/packages/config-eslint/plugins/spellcheck.js +19 -0
  63. package/packages/config-eslint/plugins/sql.js +27 -0
  64. package/packages/config-eslint/plugins/tanstack-query.js +5 -0
  65. package/packages/config-eslint/plugins/testing-library.js +10 -0
  66. package/packages/config-eslint/plugins/typescript/allow-boolean-property-list.const.js +38 -0
  67. package/packages/config-eslint/plugins/typescript/boolean-prefixes.const.js +11 -0
  68. package/packages/config-eslint/plugins/typescript/english-verbs.const.js +3368 -0
  69. package/packages/config-eslint/plugins/typescript/index.js +154 -0
  70. package/packages/config-eslint/plugins/typescript-sort-keys.js +6 -0
  71. package/packages/config-eslint/plugins/unicorn.js +66 -0
  72. package/packages/config-eslint/plugins/unused-imports.js +18 -0
  73. package/packages/config-eslint/plugins/vitest.js +17 -0
  74. package/packages/config-eslint/plugins/vue-i18n.js +35 -0
  75. package/packages/config-eslint/plugins/vue.js +268 -0
  76. package/packages/config-eslint/plugins/vuejs-accessibility.js +21 -0
  77. package/packages/config-eslint/plugins/wc.js +6 -0
  78. package/packages/config-eslint/plugins/write-good-comments.js +9 -0
  79. package/packages/config-htmllint/CHANGELOG.md +7 -0
  80. package/packages/config-htmllint/README.md +20 -0
  81. package/packages/config-htmllint/index.js +30 -0
  82. package/packages/config-htmllint/package.json +39 -0
  83. package/packages/config-htmllint/test/html.html +335 -0
  84. package/packages/config-markdownlint/CHANGELOG.md +9 -0
  85. package/packages/config-markdownlint/README.md +16 -0
  86. package/packages/config-markdownlint/index.js +17 -0
  87. package/packages/config-markdownlint/package.json +37 -0
  88. package/packages/config-markdownlint/test/deepin-2.md +106 -0
  89. package/packages/config-npmlint/CHANGELOG.md +7 -0
  90. package/packages/config-npmlint/README.md +18 -0
  91. package/packages/config-npmlint/index.json +3 -0
  92. package/packages/config-npmlint/package.json +42 -0
  93. package/packages/config-prettier/CHANGELOG.md +7 -0
  94. package/packages/config-prettier/README.md +16 -0
  95. package/packages/config-prettier/index.js +31 -0
  96. package/packages/config-prettier/package.json +48 -0
  97. package/packages/config-prettier/plugins/jsdoc.js +6 -0
  98. package/packages/config-prettier/plugins/pug.js +7 -0
  99. package/packages/config-prettier/plugins/sort-json.js +4 -0
  100. package/packages/config-prettier/plugins/svelte.js +7 -0
  101. package/packages/config-prettier/plugins/xml.js +4 -0
  102. package/packages/config-prettier/test/Migrations.sol +19 -0
  103. package/packages/config-prettier/test/jsdoc.js +27 -0
  104. package/packages/config-prettier/test/json.json +28 -0
  105. package/packages/config-prettier/test/pug.jade +14 -0
  106. package/packages/config-prettier/test/ruby.example +13 -0
  107. package/packages/config-prettier/test/sql.sql +6 -0
  108. package/packages/config-prettier/test/svelte.svelte +20 -0
  109. package/packages/config-prettier/test/svg.svg +67 -0
  110. package/packages/config-prettier/test/twig.twig +17 -0
  111. package/packages/config-prettier/test/xml.xml +43 -0
  112. package/packages/config-stylelint/CHANGELOG.md +7 -0
  113. package/packages/config-stylelint/README.md +38 -0
  114. package/packages/config-stylelint/index.js +145 -0
  115. package/packages/config-stylelint/package.json +60 -0
  116. package/packages/config-stylelint/plugins/a11y.js +12 -0
  117. package/packages/config-stylelint/plugins/at-rule-no-children.js +13 -0
  118. package/packages/config-stylelint/plugins/color-format.js +10 -0
  119. package/packages/config-stylelint/plugins/declaration-block-no-ignored-properties.js +8 -0
  120. package/packages/config-stylelint/plugins/high-performance-animation.js +14 -0
  121. package/packages/config-stylelint/plugins/no-nested-media.js +8 -0
  122. package/packages/config-stylelint/plugins/no-unresolved-module.js +25 -0
  123. package/packages/config-stylelint/plugins/no-unsupported-browser-features.js +15 -0
  124. package/packages/config-stylelint/plugins/optional/gamut.js +8 -0
  125. package/packages/config-stylelint/plugins/optional/logical-css.js +10 -0
  126. package/packages/config-stylelint/plugins/optional/no-indistinguishable-colors.js +8 -0
  127. package/packages/config-stylelint/plugins/optional/use-logical-spec.js +8 -0
  128. package/packages/config-stylelint/plugins/order.js +486 -0
  129. package/packages/config-stylelint/plugins/prettier.js +8 -0
  130. package/packages/config-stylelint/plugins/scss.js +83 -0
  131. package/packages/config-stylelint/plugins/selector-no-empty.js +8 -0
  132. package/packages/config-stylelint/plugins/use-nesting.js +8 -0
  133. package/packages/config-stylelint/plugins/vue.js +5 -0
  134. package/packages/config-stylelint/test/button.scss +7 -0
  135. package/packages/config-stylelint/test/comp-vue.vue +36 -0
  136. package/packages/config-stylelint/test/logical.scss +35 -0
  137. package/packages/config-stylelint/test/scss.scss +457 -0
  138. package/packages/config-stylelint/test/tailwind.css +8 -0
  139. package/scripts/lint.sh +7 -5
  140. package/scripts/semver.sh +17 -4
  141. package/scripts/up.sh +24 -4
  142. package/scripts/init.sh +0 -46
  143. package/scripts/ou.sh +0 -45
  144. package/scripts/publish.sh +0 -5
  145. package/scripts/upgrade.sh +0 -19
  146. package/scripts/version.sh +0 -4
@@ -0,0 +1,299 @@
1
+ /** @see [eslint-plugin-sort-class-members](https://github.com/bryanrsmith/eslint-plugin-sort-class-members) */
2
+ module.exports = {
3
+ plugins: ['sort-class-members'],
4
+
5
+ rules: {
6
+ 'sort-class-members/sort-class-members': [
7
+ 'error',
8
+ {
9
+ accessorPairPositioning: 'getThenSet',
10
+
11
+ groups: {
12
+ 'async-conventional-private-methods': [
13
+ {
14
+ async: true,
15
+ name: '/_.+/',
16
+ sort: 'alphabetical',
17
+ type: 'method',
18
+ },
19
+ ],
20
+
21
+ emits: [
22
+ {
23
+ name: '/emit[A-Z].*/',
24
+ sort: 'alphabetical',
25
+ type: 'method',
26
+ },
27
+ ],
28
+
29
+ injects: [
30
+ {
31
+ groupByDecorator: 'Inject',
32
+ sort: 'alphabetical',
33
+ type: 'property',
34
+ },
35
+ {
36
+ groupByDecorator: 'InjectReactive',
37
+ sort: 'alphabetical',
38
+ type: 'property',
39
+ },
40
+ ],
41
+
42
+ models: [
43
+ {
44
+ groupByDecorator: 'Model',
45
+ sort: 'alphabetical',
46
+ type: 'property',
47
+ },
48
+ {
49
+ groupByDecorator: 'ModelSync',
50
+ sort: 'alphabetical',
51
+ type: 'property',
52
+ },
53
+ {
54
+ groupByDecorator: 'VModel',
55
+ sort: 'alphabetical',
56
+ type: 'property',
57
+ },
58
+ ],
59
+
60
+ props: [
61
+ {
62
+ groupByDecorator: 'Prop',
63
+ sort: 'alphabetical',
64
+ type: 'property',
65
+ },
66
+ {
67
+ groupByDecorator: 'PropSync',
68
+ sort: 'alphabetical',
69
+ type: 'property',
70
+ },
71
+ ],
72
+
73
+ provides: [
74
+ {
75
+ groupByDecorator: 'Provide',
76
+ sort: 'alphabetical',
77
+ type: 'property',
78
+ },
79
+ {
80
+ groupByDecorator: 'ProvideReactive',
81
+ sort: 'alphabetical',
82
+ type: 'property',
83
+ },
84
+ ],
85
+
86
+ refs: [
87
+ {
88
+ groupByDecorator: 'Ref',
89
+ sort: 'alphabetical',
90
+ type: 'property',
91
+ },
92
+ ],
93
+
94
+ 'sorted-methods': [
95
+ {
96
+ sort: 'alphabetical',
97
+ type: 'method',
98
+ },
99
+ ],
100
+
101
+ 'sorted-properties': [
102
+ {
103
+ sort: 'alphabetical',
104
+ type: 'property',
105
+ },
106
+ ],
107
+
108
+ 'static-accessor-pairs': [
109
+ {
110
+ accessorPair: true,
111
+ sort: 'alphabetical',
112
+ static: true,
113
+ },
114
+ ],
115
+
116
+ 'static-arrow-function-properties': [
117
+ {
118
+ propertyType: 'ArrowFunctionExpression',
119
+ sort: 'alphabetical',
120
+ static: true,
121
+ },
122
+ ],
123
+
124
+ 'static-async-conventional-private-methods': [
125
+ {
126
+ async: true,
127
+ name: '/_.+/',
128
+ sort: 'alphabetical',
129
+ static: true,
130
+ type: 'method',
131
+ },
132
+ ],
133
+
134
+ 'static-async-methods': [
135
+ {
136
+ async: true,
137
+ sort: 'alphabetical',
138
+ static: true,
139
+ type: 'method',
140
+ },
141
+ ],
142
+
143
+ 'static-conventional-private-methods': [
144
+ {
145
+ name: '/_.+/',
146
+ sort: 'alphabetical',
147
+ static: true,
148
+ type: 'method',
149
+ },
150
+ ],
151
+
152
+ 'static-conventional-private-properties': [
153
+ {
154
+ name: '/_.+/',
155
+ sort: 'alphabetical',
156
+ static: true,
157
+ type: 'property',
158
+ },
159
+ ],
160
+
161
+ 'static-getters': [
162
+ {
163
+ kind: 'get',
164
+ sort: 'alphabetical',
165
+ static: true,
166
+ },
167
+ ],
168
+
169
+ 'static-setters': [
170
+ {
171
+ kind: 'set',
172
+ sort: 'alphabetical',
173
+ static: true,
174
+ },
175
+ ],
176
+
177
+ 'vue-activated': [{ name: 'activated', type: 'method' }],
178
+
179
+ 'vue-before-create': [{ name: 'beforeCreate', type: 'method' }],
180
+
181
+ 'vue-before-mount': [{ name: 'beforeMount', type: 'method' }],
182
+
183
+ 'vue-before-unmount': [{ name: 'beforeUnmount', type: 'method' }],
184
+
185
+ 'vue-before-update': [{ name: 'beforeUpdate', type: 'method' }],
186
+
187
+ 'vue-created': [{ name: 'created', type: 'method' }],
188
+
189
+ 'vue-deactivated': [{ name: 'deactivated', type: 'method' }],
190
+
191
+ 'vue-error-captured': [{ name: 'errorCaptured', type: 'method' }],
192
+
193
+ 'vue-mounted': [{ name: 'mounted', type: 'method' }],
194
+
195
+ 'vue-render-tracked': [{ name: 'renderTracked', type: 'method' }],
196
+
197
+ 'vue-render-triggered': [{ name: 'renderTriggered', type: 'method' }],
198
+
199
+ 'vue-unmounted': [{ name: 'unmounted', type: 'method' }],
200
+
201
+ 'vue-updated': [{ name: 'updated', type: 'method' }],
202
+
203
+ vuex: [
204
+ {
205
+ groupByDecorator: 'namespace',
206
+ sort: 'alphabetical',
207
+ type: 'property',
208
+ },
209
+ {
210
+ groupByDecorator: 'State',
211
+ sort: 'alphabetical',
212
+ type: 'property',
213
+ },
214
+ {
215
+ groupByDecorator: 'Getter',
216
+ sort: 'alphabetical',
217
+ type: 'property',
218
+ },
219
+ {
220
+ groupByDecorator: 'Mutation',
221
+ sort: 'alphabetical',
222
+ type: 'property',
223
+ },
224
+ {
225
+ groupByDecorator: 'Action',
226
+ sort: 'alphabetical',
227
+ type: 'property',
228
+ },
229
+ {
230
+ groupByDecorator: '(namespace',
231
+ sort: 'alphabetical',
232
+ type: 'property',
233
+ },
234
+ ],
235
+ },
236
+
237
+ order: [
238
+ // static
239
+ '[static-properties]',
240
+ '[static-arrow-function-properties]',
241
+ '[static-accessor-pairs]',
242
+ '[static-getters]',
243
+ '[static-setters]',
244
+ '[static-methods]',
245
+ '[static-async-methods]',
246
+
247
+ // decorated properties
248
+ '[vuex]',
249
+ '[injects]',
250
+ '[props]',
251
+ '[models]',
252
+ '[provides]',
253
+ '[emits]',
254
+ '[refs]',
255
+
256
+ // properties
257
+ '[sorted-properties]',
258
+ '[arrow-function-properties]',
259
+
260
+ // constructor
261
+ 'constructor',
262
+
263
+ // accessor
264
+ '[accessor-pairs]',
265
+ '[getters]',
266
+ '[setters]',
267
+
268
+ // vue lifecycle hooks
269
+ '[vue-before-create]',
270
+ '[vue-created]',
271
+ '[vue-before-mount]',
272
+ '[vue-mounted]',
273
+ '[vue-before-update]',
274
+ '[vue-updated]',
275
+ '[vue-before-unmount]',
276
+ '[vue-unmounted]',
277
+ '[vue-error-captured]',
278
+ '[vue-render-tracked]',
279
+ '[vue-render-triggered]',
280
+ '[vue-activated]',
281
+
282
+ // methods
283
+ '[sorted-methods]',
284
+ '[async-methods]',
285
+
286
+ // private static
287
+ '[static-conventional-private-properties]',
288
+ '[static-conventional-private-methods]',
289
+ '[static-async-conventional-private-methods]',
290
+
291
+ // private
292
+ '[conventional-private-properties]',
293
+ '[conventional-private-methods]',
294
+ '[async-conventional-private-methods]',
295
+ ],
296
+ },
297
+ ],
298
+ },
299
+ };
@@ -0,0 +1,11 @@
1
+ /** @see [eslint-plugin-sort-destructure-keys](https://github.com/mthadley/eslint-plugin-sort-destructure-keys) */
2
+ module.exports = {
3
+ plugins: ['sort-destructure-keys'],
4
+
5
+ rules: {
6
+ 'sort-destructure-keys/sort-destructure-keys': [
7
+ 'warn',
8
+ { caseSensitive: true },
9
+ ],
10
+ },
11
+ };
@@ -0,0 +1,8 @@
1
+ /** @see [eslint-plugin-sort-keys-fix](https://github.com/leo-buneev/eslint-plugin-sort-keys-fix) */
2
+ module.exports = {
3
+ plugins: ['sort-keys-fix'],
4
+
5
+ rules: {
6
+ 'sort-keys-fix/sort-keys-fix': 'warn',
7
+ },
8
+ };
@@ -0,0 +1,19 @@
1
+ const skipWords = require('../dictionaries');
2
+
3
+ /** @see [eslint-plugin-spellcheck](https://github.com/aotaduy/eslint-plugin-spellcheck) */
4
+ module.exports = {
5
+ plugins: ['spellcheck'],
6
+
7
+ rules: {
8
+ 'spellcheck/spell-checker': [
9
+ 'warn',
10
+ {
11
+ ignoreRequire: true,
12
+ minLength: 4,
13
+ skipIfMatch: ['^@.*', '^plugin:.*'],
14
+ skipWordIfMatch: [/^[\da-f]{3,6}$/, /^'/, /'$/],
15
+ skipWords,
16
+ },
17
+ ],
18
+ },
19
+ };
@@ -0,0 +1,27 @@
1
+ /** @see [eslint-plugin-sql](https://github.com/gajus/eslint-plugin-sql) */
2
+ module.exports = {
3
+ plugins: ['sql'],
4
+
5
+ rules: {
6
+ 'sql/format': [
7
+ 'warn',
8
+
9
+ {
10
+ ignoreExpressions: false,
11
+ ignoreInline: false,
12
+ ignoreStartWithNewLine: true,
13
+ ignoreTagless: false,
14
+ },
15
+
16
+ { spaces: 2 },
17
+ ],
18
+
19
+ 'sql/no-unsafe-query': [
20
+ 'warn',
21
+
22
+ {
23
+ allowLiteral: false,
24
+ },
25
+ ],
26
+ },
27
+ };
@@ -0,0 +1,5 @@
1
+ /** @see [@tanstack/query](https://tanstack.com/query/v4/docs/react/eslint/eslint-plugin-query) */
2
+ module.exports = {
3
+ extends: ['plugin:@tanstack/eslint-plugin-query/recommended'],
4
+ plugins: ['@tanstack/query'],
5
+ };
@@ -0,0 +1,10 @@
1
+ /** @see [eslint-plugin-testing-library](https://github.com/testing-library/eslint-plugin-testing-library) */
2
+ module.exports = {
3
+ overrides: [
4
+ {
5
+ extends: ['plugin:testing-library/vue'],
6
+ files: ['*.test.ts', '*.test.js', '*.spec.ts', '*.spec.js'],
7
+ plugins: ['testing-library'],
8
+ },
9
+ ],
10
+ };
@@ -0,0 +1,38 @@
1
+ module.exports = [
2
+ // html attributes
3
+ 'allowfullscreen',
4
+ 'allowpaymentrequest',
5
+ 'async',
6
+ 'autofocus',
7
+ 'autoplay',
8
+ 'checked',
9
+ 'controls',
10
+ 'default',
11
+ 'defer',
12
+ 'disabled',
13
+ 'formnovalidate',
14
+ 'hidden',
15
+ 'ismap',
16
+ 'itemscope',
17
+ 'multiple',
18
+ 'muted',
19
+ 'nomodule',
20
+ 'novalidate',
21
+ 'open',
22
+ 'playsinline',
23
+ 'readonly',
24
+ 'required',
25
+ 'reversed',
26
+ 'selected',
27
+ 'truespeed',
28
+
29
+ // vuex store module registration
30
+ 'namespaced',
31
+
32
+ // other
33
+ 'enabled',
34
+ 'invalid',
35
+ 'loading',
36
+ 'valid',
37
+ 'value',
38
+ ];
@@ -0,0 +1,11 @@
1
+ module.exports = [
2
+ 'can',
3
+ 'did',
4
+ 'has',
5
+ 'is',
6
+ 'may',
7
+ 'must',
8
+ 'need',
9
+ 'should',
10
+ 'will',
11
+ ];