@kazupon/eslint-config 0.7.0 → 0.9.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 (66) hide show
  1. package/README.md +15 -12
  2. package/dist/config.d.cts +6 -1
  3. package/dist/config.d.ts +6 -1
  4. package/dist/configs/comments.d.cts +14 -3
  5. package/dist/configs/comments.d.ts +14 -3
  6. package/dist/configs/index.d.cts +1 -0
  7. package/dist/configs/index.d.ts +1 -0
  8. package/dist/configs/javascript.d.cts +14 -3
  9. package/dist/configs/javascript.d.ts +14 -3
  10. package/dist/configs/jsdoc.d.cts +24 -4
  11. package/dist/configs/jsdoc.d.ts +24 -4
  12. package/dist/configs/jsonc.d.cts +36 -6
  13. package/dist/configs/jsonc.d.ts +36 -6
  14. package/dist/configs/prettier.d.cts +14 -3
  15. package/dist/configs/prettier.d.ts +14 -3
  16. package/dist/configs/promise.d.cts +15 -0
  17. package/dist/configs/promise.d.ts +15 -0
  18. package/dist/configs/regexp.d.cts +14 -3
  19. package/dist/configs/regexp.d.ts +14 -3
  20. package/dist/configs/typescript.d.cts +33 -6
  21. package/dist/configs/typescript.d.ts +33 -6
  22. package/dist/configs/unicorn.d.cts +14 -3
  23. package/dist/configs/unicorn.d.ts +14 -3
  24. package/dist/configs/vue.d.cts +17 -3
  25. package/dist/configs/vue.d.ts +17 -3
  26. package/dist/configs/yml.d.cts +18 -3
  27. package/dist/configs/yml.d.ts +18 -3
  28. package/dist/globs.d.cts +9 -9
  29. package/dist/globs.d.ts +9 -9
  30. package/dist/index.cjs +18 -3
  31. package/dist/index.d.cts +1 -0
  32. package/dist/index.d.ts +1 -0
  33. package/dist/index.js +18 -4
  34. package/dist/types/gens/comments.d.cts +65 -0
  35. package/dist/types/gens/comments.d.ts +65 -0
  36. package/dist/types/gens/eslint.d.cts +17 -0
  37. package/dist/types/gens/eslint.d.ts +17 -0
  38. package/dist/types/gens/javascript.d.cts +3162 -0
  39. package/dist/types/gens/javascript.d.ts +3162 -0
  40. package/dist/types/gens/jsdoc.d.cts +744 -0
  41. package/dist/types/gens/jsdoc.d.ts +744 -0
  42. package/dist/types/gens/jsonc.d.cts +513 -0
  43. package/dist/types/gens/jsonc.d.ts +513 -0
  44. package/dist/types/gens/prettier.d.cts +2 -0
  45. package/dist/types/gens/prettier.d.ts +2 -0
  46. package/dist/types/gens/promise.d.cts +107 -0
  47. package/dist/types/gens/promise.d.ts +107 -0
  48. package/dist/types/gens/regexp.d.cts +553 -0
  49. package/dist/types/gens/regexp.d.ts +553 -0
  50. package/dist/types/gens/typescript.d.cts +2253 -0
  51. package/dist/types/gens/typescript.d.ts +2253 -0
  52. package/dist/types/gens/unicorn.d.cts +905 -0
  53. package/dist/types/gens/unicorn.d.ts +905 -0
  54. package/dist/types/gens/vue.d.cts +2465 -0
  55. package/dist/types/gens/vue.d.ts +2465 -0
  56. package/dist/types/gens/yml.d.cts +375 -0
  57. package/dist/types/gens/yml.d.ts +375 -0
  58. package/dist/types/index.d.cts +14 -0
  59. package/dist/types/index.d.ts +14 -0
  60. package/dist/types/overrides.d.cts +6 -0
  61. package/dist/types/overrides.d.ts +6 -0
  62. package/dist/types/utils.d.cts +4 -0
  63. package/dist/types/utils.d.ts +4 -0
  64. package/dist/utils.d.cts +22 -1
  65. package/dist/utils.d.ts +22 -1
  66. package/package.json +9 -2
@@ -0,0 +1,375 @@
1
+ import type { Linter } from 'eslint';
2
+ export interface YmlRules {
3
+ /**
4
+ * require or disallow block style mappings.
5
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html
6
+ */
7
+ 'yml/block-mapping'?: Linter.RuleEntry<YmlBlockMapping>;
8
+ /**
9
+ * enforce consistent line breaks after `:` indicator
10
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html
11
+ */
12
+ 'yml/block-mapping-colon-indicator-newline'?: Linter.RuleEntry<YmlBlockMappingColonIndicatorNewline>;
13
+ /**
14
+ * enforce consistent line breaks after `?` indicator
15
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-question-indicator-newline.html
16
+ */
17
+ 'yml/block-mapping-question-indicator-newline'?: Linter.RuleEntry<YmlBlockMappingQuestionIndicatorNewline>;
18
+ /**
19
+ * require or disallow block style sequences.
20
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence.html
21
+ */
22
+ 'yml/block-sequence'?: Linter.RuleEntry<YmlBlockSequence>;
23
+ /**
24
+ * enforce consistent line breaks after `-` indicator
25
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence-hyphen-indicator-newline.html
26
+ */
27
+ 'yml/block-sequence-hyphen-indicator-newline'?: Linter.RuleEntry<YmlBlockSequenceHyphenIndicatorNewline>;
28
+ /**
29
+ * enforce YAML file extension
30
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/file-extension.html
31
+ */
32
+ 'yml/file-extension'?: Linter.RuleEntry<YmlFileExtension>;
33
+ /**
34
+ * enforce consistent line breaks inside braces
35
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-newline.html
36
+ */
37
+ 'yml/flow-mapping-curly-newline'?: Linter.RuleEntry<YmlFlowMappingCurlyNewline>;
38
+ /**
39
+ * enforce consistent spacing inside braces
40
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-spacing.html
41
+ */
42
+ 'yml/flow-mapping-curly-spacing'?: Linter.RuleEntry<YmlFlowMappingCurlySpacing>;
43
+ /**
44
+ * enforce linebreaks after opening and before closing flow sequence brackets
45
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-newline.html
46
+ */
47
+ 'yml/flow-sequence-bracket-newline'?: Linter.RuleEntry<YmlFlowSequenceBracketNewline>;
48
+ /**
49
+ * enforce consistent spacing inside flow sequence brackets
50
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-spacing.html
51
+ */
52
+ 'yml/flow-sequence-bracket-spacing'?: Linter.RuleEntry<YmlFlowSequenceBracketSpacing>;
53
+ /**
54
+ * enforce consistent indentation
55
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/indent.html
56
+ */
57
+ 'yml/indent'?: Linter.RuleEntry<YmlIndent>;
58
+ /**
59
+ * enforce naming convention to key names
60
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-name-casing.html
61
+ */
62
+ 'yml/key-name-casing'?: Linter.RuleEntry<YmlKeyNameCasing>;
63
+ /**
64
+ * enforce consistent spacing between keys and values in mapping pairs
65
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html
66
+ */
67
+ 'yml/key-spacing'?: Linter.RuleEntry<YmlKeySpacing>;
68
+ /**
69
+ * disallow empty document
70
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-document.html
71
+ */
72
+ 'yml/no-empty-document'?: Linter.RuleEntry<[]>;
73
+ /**
74
+ * disallow empty mapping keys
75
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-key.html
76
+ */
77
+ 'yml/no-empty-key'?: Linter.RuleEntry<[]>;
78
+ /**
79
+ * disallow empty mapping values
80
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-mapping-value.html
81
+ */
82
+ 'yml/no-empty-mapping-value'?: Linter.RuleEntry<[]>;
83
+ /**
84
+ * disallow empty sequence entries
85
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-sequence-entry.html
86
+ */
87
+ 'yml/no-empty-sequence-entry'?: Linter.RuleEntry<[]>;
88
+ /**
89
+ * disallow irregular whitespace
90
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-irregular-whitespace.html
91
+ */
92
+ 'yml/no-irregular-whitespace'?: Linter.RuleEntry<YmlNoIrregularWhitespace>;
93
+ /**
94
+ * disallow multiple empty lines
95
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-multiple-empty-lines.html
96
+ */
97
+ 'yml/no-multiple-empty-lines'?: Linter.RuleEntry<YmlNoMultipleEmptyLines>;
98
+ /**
99
+ * disallow tabs for indentation.
100
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-tab-indent.html
101
+ */
102
+ 'yml/no-tab-indent'?: Linter.RuleEntry<[]>;
103
+ /**
104
+ * disallow trailing zeros for floats
105
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html
106
+ */
107
+ 'yml/no-trailing-zeros'?: Linter.RuleEntry<[]>;
108
+ /**
109
+ * require or disallow plain style scalar.
110
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/plain-scalar.html
111
+ */
112
+ 'yml/plain-scalar'?: Linter.RuleEntry<YmlPlainScalar>;
113
+ /**
114
+ * enforce the consistent use of either double, or single quotes
115
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/quotes.html
116
+ */
117
+ 'yml/quotes'?: Linter.RuleEntry<YmlQuotes>;
118
+ /**
119
+ * disallow mapping keys other than strings
120
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/require-string-key.html
121
+ */
122
+ 'yml/require-string-key'?: Linter.RuleEntry<[]>;
123
+ /**
124
+ * require mapping keys to be sorted
125
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-keys.html
126
+ */
127
+ 'yml/sort-keys'?: Linter.RuleEntry<YmlSortKeys>;
128
+ /**
129
+ * require sequence values to be sorted
130
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-sequence-values.html
131
+ */
132
+ 'yml/sort-sequence-values'?: Linter.RuleEntry<YmlSortSequenceValues>;
133
+ /**
134
+ * enforce consistent spacing after the `#` in a comment
135
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/spaced-comment.html
136
+ */
137
+ 'yml/spaced-comment'?: Linter.RuleEntry<YmlSpacedComment>;
138
+ /**
139
+ * disallow parsing errors in Vue custom blocks
140
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/vue-custom-block/no-parsing-error.html
141
+ */
142
+ 'yml/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]>;
143
+ }
144
+ type YmlBlockMapping = [] | [
145
+ (("always" | "never") | {
146
+ singleline?: ("always" | "never" | "ignore");
147
+ multiline?: ("always" | "never" | "ignore");
148
+ })
149
+ ];
150
+ type YmlBlockMappingColonIndicatorNewline = [] | [("always" | "never")];
151
+ type YmlBlockMappingQuestionIndicatorNewline = [] | [("always" | "never")];
152
+ type YmlBlockSequence = [] | [
153
+ (("always" | "never") | {
154
+ singleline?: ("always" | "never" | "ignore");
155
+ multiline?: ("always" | "never" | "ignore");
156
+ })
157
+ ];
158
+ type YmlBlockSequenceHyphenIndicatorNewline = [] | [("always" | "never")] | [
159
+ ("always" | "never"),
160
+ {
161
+ nestedHyphen?: ("always" | "never");
162
+ blockMapping?: ("always" | "never");
163
+ }
164
+ ];
165
+ type YmlFileExtension = [] | [
166
+ {
167
+ extension?: ("yaml" | "yml");
168
+ caseSensitive?: boolean;
169
+ }
170
+ ];
171
+ type YmlFlowMappingCurlyNewline = [] | [
172
+ (("always" | "never") | {
173
+ multiline?: boolean;
174
+ minProperties?: number;
175
+ consistent?: boolean;
176
+ })
177
+ ];
178
+ type YmlFlowMappingCurlySpacing = [] | [("always" | "never")] | [
179
+ ("always" | "never"),
180
+ {
181
+ arraysInObjects?: boolean;
182
+ objectsInObjects?: boolean;
183
+ }
184
+ ];
185
+ type YmlFlowSequenceBracketNewline = [] | [
186
+ (("always" | "never" | "consistent") | {
187
+ multiline?: boolean;
188
+ minItems?: (number | null);
189
+ })
190
+ ];
191
+ type YmlFlowSequenceBracketSpacing = [] | [("always" | "never")] | [
192
+ ("always" | "never"),
193
+ {
194
+ singleValue?: boolean;
195
+ objectsInArrays?: boolean;
196
+ arraysInArrays?: boolean;
197
+ }
198
+ ];
199
+ type YmlIndent = [] | [number] | [
200
+ number,
201
+ {
202
+ indentBlockSequences?: boolean;
203
+ indicatorValueIndent?: number;
204
+ }
205
+ ];
206
+ type YmlKeyNameCasing = [] | [
207
+ {
208
+ camelCase?: boolean;
209
+ PascalCase?: boolean;
210
+ SCREAMING_SNAKE_CASE?: boolean;
211
+ "kebab-case"?: boolean;
212
+ snake_case?: boolean;
213
+ ignores?: string[];
214
+ }
215
+ ];
216
+ type YmlKeySpacing = [] | [
217
+ ({
218
+ align?: (("colon" | "value") | {
219
+ on?: ("colon" | "value");
220
+ mode?: ("strict" | "minimum");
221
+ beforeColon?: boolean;
222
+ afterColon?: boolean;
223
+ });
224
+ mode?: ("strict" | "minimum");
225
+ beforeColon?: boolean;
226
+ afterColon?: boolean;
227
+ } | {
228
+ singleLine?: {
229
+ mode?: ("strict" | "minimum");
230
+ beforeColon?: boolean;
231
+ afterColon?: boolean;
232
+ };
233
+ multiLine?: {
234
+ align?: (("colon" | "value") | {
235
+ on?: ("colon" | "value");
236
+ mode?: ("strict" | "minimum");
237
+ beforeColon?: boolean;
238
+ afterColon?: boolean;
239
+ });
240
+ mode?: ("strict" | "minimum");
241
+ beforeColon?: boolean;
242
+ afterColon?: boolean;
243
+ };
244
+ } | {
245
+ singleLine?: {
246
+ mode?: ("strict" | "minimum");
247
+ beforeColon?: boolean;
248
+ afterColon?: boolean;
249
+ };
250
+ multiLine?: {
251
+ mode?: ("strict" | "minimum");
252
+ beforeColon?: boolean;
253
+ afterColon?: boolean;
254
+ };
255
+ align?: {
256
+ on?: ("colon" | "value");
257
+ mode?: ("strict" | "minimum");
258
+ beforeColon?: boolean;
259
+ afterColon?: boolean;
260
+ };
261
+ })
262
+ ];
263
+ type YmlNoIrregularWhitespace = [] | [
264
+ {
265
+ skipComments?: boolean;
266
+ skipQuotedScalars?: boolean;
267
+ }
268
+ ];
269
+ type YmlNoMultipleEmptyLines = [] | [
270
+ {
271
+ max: number;
272
+ maxEOF?: number;
273
+ maxBOF?: number;
274
+ }
275
+ ];
276
+ type YmlPlainScalar = [] | [("always" | "never")] | [
277
+ ("always" | "never"),
278
+ {
279
+ ignorePatterns?: string[];
280
+ }
281
+ ];
282
+ type YmlQuotes = [] | [
283
+ {
284
+ prefer?: ("double" | "single");
285
+ avoidEscape?: boolean;
286
+ }
287
+ ];
288
+ type YmlSortKeys = ([
289
+ {
290
+ pathPattern: string;
291
+ hasProperties?: string[];
292
+ order: ((string | {
293
+ keyPattern?: string;
294
+ order?: {
295
+ type?: ("asc" | "desc");
296
+ caseSensitive?: boolean;
297
+ natural?: boolean;
298
+ };
299
+ })[] | {
300
+ type?: ("asc" | "desc");
301
+ caseSensitive?: boolean;
302
+ natural?: boolean;
303
+ });
304
+ minKeys?: number;
305
+ allowLineSeparatedGroups?: boolean;
306
+ },
307
+ ...({
308
+ pathPattern: string;
309
+ hasProperties?: string[];
310
+ order: ((string | {
311
+ keyPattern?: string;
312
+ order?: {
313
+ type?: ("asc" | "desc");
314
+ caseSensitive?: boolean;
315
+ natural?: boolean;
316
+ };
317
+ })[] | {
318
+ type?: ("asc" | "desc");
319
+ caseSensitive?: boolean;
320
+ natural?: boolean;
321
+ });
322
+ minKeys?: number;
323
+ allowLineSeparatedGroups?: boolean;
324
+ })[]
325
+ ] | [] | [("asc" | "desc")] | [
326
+ ("asc" | "desc"),
327
+ {
328
+ caseSensitive?: boolean;
329
+ natural?: boolean;
330
+ minKeys?: number;
331
+ allowLineSeparatedGroups?: boolean;
332
+ }
333
+ ]);
334
+ type YmlSortSequenceValues = [
335
+ {
336
+ pathPattern: string;
337
+ order: ((string | {
338
+ valuePattern?: string;
339
+ order?: {
340
+ type?: ("asc" | "desc");
341
+ caseSensitive?: boolean;
342
+ natural?: boolean;
343
+ };
344
+ })[] | {
345
+ type?: ("asc" | "desc");
346
+ caseSensitive?: boolean;
347
+ natural?: boolean;
348
+ });
349
+ minValues?: number;
350
+ },
351
+ ...({
352
+ pathPattern: string;
353
+ order: ((string | {
354
+ valuePattern?: string;
355
+ order?: {
356
+ type?: ("asc" | "desc");
357
+ caseSensitive?: boolean;
358
+ natural?: boolean;
359
+ };
360
+ })[] | {
361
+ type?: ("asc" | "desc");
362
+ caseSensitive?: boolean;
363
+ natural?: boolean;
364
+ });
365
+ minValues?: number;
366
+ })[]
367
+ ];
368
+ type YmlSpacedComment = [] | [("always" | "never")] | [
369
+ ("always" | "never"),
370
+ {
371
+ exceptions?: string[];
372
+ markers?: string[];
373
+ }
374
+ ];
375
+ export {};