@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,513 @@
1
+ import type { Linter } from 'eslint';
2
+ export interface JsoncRules {
3
+ /**
4
+ * enforce line breaks after opening and before closing array brackets
5
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-newline.html
6
+ */
7
+ 'jsonc/array-bracket-newline'?: Linter.RuleEntry<JsoncArrayBracketNewline>;
8
+ /**
9
+ * disallow or enforce spaces inside of brackets
10
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-spacing.html
11
+ */
12
+ 'jsonc/array-bracket-spacing'?: Linter.RuleEntry<JsoncArrayBracketSpacing>;
13
+ /**
14
+ * enforce line breaks between array elements
15
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-element-newline.html
16
+ */
17
+ 'jsonc/array-element-newline'?: Linter.RuleEntry<JsoncArrayElementNewline>;
18
+ /**
19
+ * apply jsonc rules similar to your configured ESLint core rules
20
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/auto.html
21
+ */
22
+ 'jsonc/auto'?: Linter.RuleEntry<[]>;
23
+ /**
24
+ * require or disallow trailing commas
25
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-dangle.html
26
+ */
27
+ 'jsonc/comma-dangle'?: Linter.RuleEntry<JsoncCommaDangle>;
28
+ /**
29
+ * enforce consistent comma style
30
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-style.html
31
+ */
32
+ 'jsonc/comma-style'?: Linter.RuleEntry<JsoncCommaStyle>;
33
+ /**
34
+ * enforce consistent indentation
35
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/indent.html
36
+ */
37
+ 'jsonc/indent'?: Linter.RuleEntry<JsoncIndent>;
38
+ /**
39
+ * enforce naming convention to property key names
40
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-name-casing.html
41
+ */
42
+ 'jsonc/key-name-casing'?: Linter.RuleEntry<JsoncKeyNameCasing>;
43
+ /**
44
+ * enforce consistent spacing between keys and values in object literal properties
45
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-spacing.html
46
+ */
47
+ 'jsonc/key-spacing'?: Linter.RuleEntry<JsoncKeySpacing>;
48
+ /**
49
+ * disallow BigInt literals
50
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-bigint-literals.html
51
+ */
52
+ 'jsonc/no-bigint-literals'?: Linter.RuleEntry<[]>;
53
+ /**
54
+ * disallow binary expression
55
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-expression.html
56
+ */
57
+ 'jsonc/no-binary-expression'?: Linter.RuleEntry<[]>;
58
+ /**
59
+ * disallow binary numeric literals
60
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-numeric-literals.html
61
+ */
62
+ 'jsonc/no-binary-numeric-literals'?: Linter.RuleEntry<[]>;
63
+ /**
64
+ * disallow comments
65
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-comments.html
66
+ */
67
+ 'jsonc/no-comments'?: Linter.RuleEntry<[]>;
68
+ /**
69
+ * disallow duplicate keys in object literals
70
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-dupe-keys.html
71
+ */
72
+ 'jsonc/no-dupe-keys'?: Linter.RuleEntry<[]>;
73
+ /**
74
+ * disallow escape sequences in identifiers.
75
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-escape-sequence-in-identifier.html
76
+ */
77
+ 'jsonc/no-escape-sequence-in-identifier'?: Linter.RuleEntry<[]>;
78
+ /**
79
+ * disallow leading or trailing decimal points in numeric literals
80
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-floating-decimal.html
81
+ */
82
+ 'jsonc/no-floating-decimal'?: Linter.RuleEntry<[]>;
83
+ /**
84
+ * disallow hexadecimal numeric literals
85
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-hexadecimal-numeric-literals.html
86
+ */
87
+ 'jsonc/no-hexadecimal-numeric-literals'?: Linter.RuleEntry<[]>;
88
+ /**
89
+ * disallow Infinity
90
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-infinity.html
91
+ */
92
+ 'jsonc/no-infinity'?: Linter.RuleEntry<[]>;
93
+ /**
94
+ * disallow irregular whitespace
95
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html
96
+ */
97
+ 'jsonc/no-irregular-whitespace'?: Linter.RuleEntry<JsoncNoIrregularWhitespace>;
98
+ /**
99
+ * disallow multiline strings
100
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-multi-str.html
101
+ */
102
+ 'jsonc/no-multi-str'?: Linter.RuleEntry<[]>;
103
+ /**
104
+ * disallow NaN
105
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-nan.html
106
+ */
107
+ 'jsonc/no-nan'?: Linter.RuleEntry<[]>;
108
+ /**
109
+ * disallow number property keys
110
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-number-props.html
111
+ */
112
+ 'jsonc/no-number-props'?: Linter.RuleEntry<[]>;
113
+ /**
114
+ * disallow numeric separators
115
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-numeric-separators.html
116
+ */
117
+ 'jsonc/no-numeric-separators'?: Linter.RuleEntry<[]>;
118
+ /**
119
+ * disallow legacy octal literals
120
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal.html
121
+ */
122
+ 'jsonc/no-octal'?: Linter.RuleEntry<[]>;
123
+ /**
124
+ * disallow octal escape sequences in string literals
125
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-escape.html
126
+ */
127
+ 'jsonc/no-octal-escape'?: Linter.RuleEntry<[]>;
128
+ /**
129
+ * disallow octal numeric literals
130
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-numeric-literals.html
131
+ */
132
+ 'jsonc/no-octal-numeric-literals'?: Linter.RuleEntry<[]>;
133
+ /**
134
+ * disallow parentheses around the expression
135
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-parenthesized.html
136
+ */
137
+ 'jsonc/no-parenthesized'?: Linter.RuleEntry<[]>;
138
+ /**
139
+ * disallow plus sign
140
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-plus-sign.html
141
+ */
142
+ 'jsonc/no-plus-sign'?: Linter.RuleEntry<[]>;
143
+ /**
144
+ * disallow RegExp literals
145
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-regexp-literals.html
146
+ */
147
+ 'jsonc/no-regexp-literals'?: Linter.RuleEntry<[]>;
148
+ /**
149
+ * disallow sparse arrays
150
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-sparse-arrays.html
151
+ */
152
+ 'jsonc/no-sparse-arrays'?: Linter.RuleEntry<[]>;
153
+ /**
154
+ * disallow template literals
155
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-template-literals.html
156
+ */
157
+ 'jsonc/no-template-literals'?: Linter.RuleEntry<[]>;
158
+ /**
159
+ * disallow `undefined`
160
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-undefined-value.html
161
+ */
162
+ 'jsonc/no-undefined-value'?: Linter.RuleEntry<[]>;
163
+ /**
164
+ * disallow Unicode code point escape sequences.
165
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-unicode-codepoint-escapes.html
166
+ */
167
+ 'jsonc/no-unicode-codepoint-escapes'?: Linter.RuleEntry<[]>;
168
+ /**
169
+ * disallow unnecessary escape usage
170
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-useless-escape.html
171
+ */
172
+ 'jsonc/no-useless-escape'?: Linter.RuleEntry<[]>;
173
+ /**
174
+ * enforce consistent line breaks inside braces
175
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-newline.html
176
+ */
177
+ 'jsonc/object-curly-newline'?: Linter.RuleEntry<JsoncObjectCurlyNewline>;
178
+ /**
179
+ * enforce consistent spacing inside braces
180
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-spacing.html
181
+ */
182
+ 'jsonc/object-curly-spacing'?: Linter.RuleEntry<JsoncObjectCurlySpacing>;
183
+ /**
184
+ * enforce placing object properties on separate lines
185
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-property-newline.html
186
+ */
187
+ 'jsonc/object-property-newline'?: Linter.RuleEntry<JsoncObjectPropertyNewline>;
188
+ /**
189
+ * require quotes around object literal property names
190
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quote-props.html
191
+ */
192
+ 'jsonc/quote-props'?: Linter.RuleEntry<JsoncQuoteProps>;
193
+ /**
194
+ * enforce use of double or single quotes
195
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quotes.html
196
+ */
197
+ 'jsonc/quotes'?: Linter.RuleEntry<JsoncQuotes>;
198
+ /**
199
+ * require array values to be sorted
200
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-array-values.html
201
+ */
202
+ 'jsonc/sort-array-values'?: Linter.RuleEntry<JsoncSortArrayValues>;
203
+ /**
204
+ * require object keys to be sorted
205
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-keys.html
206
+ */
207
+ 'jsonc/sort-keys'?: Linter.RuleEntry<JsoncSortKeys>;
208
+ /**
209
+ * disallow spaces after unary operators
210
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/space-unary-ops.html
211
+ */
212
+ 'jsonc/space-unary-ops'?: Linter.RuleEntry<JsoncSpaceUnaryOps>;
213
+ /**
214
+ * disallow invalid number for JSON
215
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/valid-json-number.html
216
+ */
217
+ 'jsonc/valid-json-number'?: Linter.RuleEntry<[]>;
218
+ /**
219
+ * disallow parsing errors in Vue custom blocks
220
+ * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/vue-custom-block/no-parsing-error.html
221
+ */
222
+ 'jsonc/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]>;
223
+ }
224
+ type JsoncArrayBracketNewline = [] | [
225
+ (("always" | "never" | "consistent") | {
226
+ multiline?: boolean;
227
+ minItems?: (number | null);
228
+ })
229
+ ];
230
+ type JsoncArrayBracketSpacing = [] | [("always" | "never")] | [
231
+ ("always" | "never"),
232
+ {
233
+ singleValue?: boolean;
234
+ objectsInArrays?: boolean;
235
+ arraysInArrays?: boolean;
236
+ }
237
+ ];
238
+ type JsoncArrayElementNewline = [] | [
239
+ (_JsoncArrayElementNewlineBasicConfig | {
240
+ ArrayExpression?: _JsoncArrayElementNewlineBasicConfig;
241
+ JSONArrayExpression?: _JsoncArrayElementNewlineBasicConfig;
242
+ ArrayPattern?: _JsoncArrayElementNewlineBasicConfig;
243
+ })
244
+ ];
245
+ type _JsoncArrayElementNewlineBasicConfig = (("always" | "never" | "consistent") | {
246
+ multiline?: boolean;
247
+ minItems?: (number | null);
248
+ });
249
+ type JsoncCommaDangle = [] | [
250
+ (_JsoncCommaDangleValue | {
251
+ arrays?: _JsoncCommaDangleValueWithIgnore;
252
+ objects?: _JsoncCommaDangleValueWithIgnore;
253
+ imports?: _JsoncCommaDangleValueWithIgnore;
254
+ exports?: _JsoncCommaDangleValueWithIgnore;
255
+ functions?: _JsoncCommaDangleValueWithIgnore;
256
+ })
257
+ ];
258
+ type _JsoncCommaDangleValue = ("always-multiline" | "always" | "never" | "only-multiline");
259
+ type _JsoncCommaDangleValueWithIgnore = ("always-multiline" | "always" | "ignore" | "never" | "only-multiline");
260
+ type JsoncCommaStyle = [] | [("first" | "last")] | [
261
+ ("first" | "last"),
262
+ {
263
+ exceptions?: {
264
+ [k: string]: boolean | undefined;
265
+ };
266
+ }
267
+ ];
268
+ type JsoncIndent = [] | [("tab" | number)] | [
269
+ ("tab" | number),
270
+ {
271
+ SwitchCase?: number;
272
+ VariableDeclarator?: ((number | ("first" | "off")) | {
273
+ var?: (number | ("first" | "off"));
274
+ let?: (number | ("first" | "off"));
275
+ const?: (number | ("first" | "off"));
276
+ });
277
+ outerIIFEBody?: (number | "off");
278
+ MemberExpression?: (number | "off");
279
+ FunctionDeclaration?: {
280
+ parameters?: (number | ("first" | "off"));
281
+ body?: number;
282
+ };
283
+ FunctionExpression?: {
284
+ parameters?: (number | ("first" | "off"));
285
+ body?: number;
286
+ };
287
+ StaticBlock?: {
288
+ body?: number;
289
+ };
290
+ CallExpression?: {
291
+ arguments?: (number | ("first" | "off"));
292
+ };
293
+ ArrayExpression?: (number | ("first" | "off"));
294
+ ObjectExpression?: (number | ("first" | "off"));
295
+ ImportDeclaration?: (number | ("first" | "off"));
296
+ flatTernaryExpressions?: boolean;
297
+ offsetTernaryExpressions?: boolean;
298
+ ignoredNodes?: string[];
299
+ ignoreComments?: boolean;
300
+ }
301
+ ];
302
+ type JsoncKeyNameCasing = [] | [
303
+ {
304
+ camelCase?: boolean;
305
+ PascalCase?: boolean;
306
+ SCREAMING_SNAKE_CASE?: boolean;
307
+ "kebab-case"?: boolean;
308
+ snake_case?: boolean;
309
+ ignores?: string[];
310
+ }
311
+ ];
312
+ type JsoncKeySpacing = [] | [
313
+ ({
314
+ align?: (("colon" | "value") | {
315
+ mode?: ("strict" | "minimum");
316
+ on?: ("colon" | "value");
317
+ beforeColon?: boolean;
318
+ afterColon?: boolean;
319
+ });
320
+ mode?: ("strict" | "minimum");
321
+ beforeColon?: boolean;
322
+ afterColon?: boolean;
323
+ } | {
324
+ singleLine?: {
325
+ mode?: ("strict" | "minimum");
326
+ beforeColon?: boolean;
327
+ afterColon?: boolean;
328
+ };
329
+ multiLine?: {
330
+ align?: (("colon" | "value") | {
331
+ mode?: ("strict" | "minimum");
332
+ on?: ("colon" | "value");
333
+ beforeColon?: boolean;
334
+ afterColon?: boolean;
335
+ });
336
+ mode?: ("strict" | "minimum");
337
+ beforeColon?: boolean;
338
+ afterColon?: boolean;
339
+ };
340
+ } | {
341
+ singleLine?: {
342
+ mode?: ("strict" | "minimum");
343
+ beforeColon?: boolean;
344
+ afterColon?: boolean;
345
+ };
346
+ multiLine?: {
347
+ mode?: ("strict" | "minimum");
348
+ beforeColon?: boolean;
349
+ afterColon?: boolean;
350
+ };
351
+ align?: {
352
+ mode?: ("strict" | "minimum");
353
+ on?: ("colon" | "value");
354
+ beforeColon?: boolean;
355
+ afterColon?: boolean;
356
+ };
357
+ })
358
+ ];
359
+ type JsoncNoIrregularWhitespace = [] | [
360
+ {
361
+ skipComments?: boolean;
362
+ skipStrings?: boolean;
363
+ skipTemplates?: boolean;
364
+ skipRegExps?: boolean;
365
+ skipJSXText?: boolean;
366
+ }
367
+ ];
368
+ type JsoncObjectCurlyNewline = [] | [
369
+ ((("always" | "never") | {
370
+ multiline?: boolean;
371
+ minProperties?: number;
372
+ consistent?: boolean;
373
+ }) | {
374
+ ObjectExpression?: (("always" | "never") | {
375
+ multiline?: boolean;
376
+ minProperties?: number;
377
+ consistent?: boolean;
378
+ });
379
+ ObjectPattern?: (("always" | "never") | {
380
+ multiline?: boolean;
381
+ minProperties?: number;
382
+ consistent?: boolean;
383
+ });
384
+ ImportDeclaration?: (("always" | "never") | {
385
+ multiline?: boolean;
386
+ minProperties?: number;
387
+ consistent?: boolean;
388
+ });
389
+ ExportDeclaration?: (("always" | "never") | {
390
+ multiline?: boolean;
391
+ minProperties?: number;
392
+ consistent?: boolean;
393
+ });
394
+ })
395
+ ];
396
+ type JsoncObjectCurlySpacing = [] | [("always" | "never")] | [
397
+ ("always" | "never"),
398
+ {
399
+ arraysInObjects?: boolean;
400
+ objectsInObjects?: boolean;
401
+ }
402
+ ];
403
+ type JsoncObjectPropertyNewline = [] | [
404
+ {
405
+ allowAllPropertiesOnSameLine?: boolean;
406
+ allowMultiplePropertiesPerLine?: boolean;
407
+ }
408
+ ];
409
+ type JsoncQuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [
410
+ ("always" | "as-needed" | "consistent" | "consistent-as-needed"),
411
+ {
412
+ keywords?: boolean;
413
+ unnecessary?: boolean;
414
+ numbers?: boolean;
415
+ }
416
+ ]);
417
+ type JsoncQuotes = [] | [("single" | "double" | "backtick")] | [
418
+ ("single" | "double" | "backtick"),
419
+ ("avoid-escape" | {
420
+ avoidEscape?: boolean;
421
+ allowTemplateLiterals?: boolean;
422
+ })
423
+ ];
424
+ type JsoncSortArrayValues = [
425
+ {
426
+ pathPattern: string;
427
+ order: ((string | {
428
+ valuePattern?: string;
429
+ order?: {
430
+ type?: ("asc" | "desc");
431
+ caseSensitive?: boolean;
432
+ natural?: boolean;
433
+ };
434
+ })[] | {
435
+ type?: ("asc" | "desc");
436
+ caseSensitive?: boolean;
437
+ natural?: boolean;
438
+ });
439
+ minValues?: number;
440
+ },
441
+ ...({
442
+ pathPattern: string;
443
+ order: ((string | {
444
+ valuePattern?: string;
445
+ order?: {
446
+ type?: ("asc" | "desc");
447
+ caseSensitive?: boolean;
448
+ natural?: boolean;
449
+ };
450
+ })[] | {
451
+ type?: ("asc" | "desc");
452
+ caseSensitive?: boolean;
453
+ natural?: boolean;
454
+ });
455
+ minValues?: number;
456
+ })[]
457
+ ];
458
+ type JsoncSortKeys = ([
459
+ {
460
+ pathPattern: string;
461
+ hasProperties?: string[];
462
+ order: ((string | {
463
+ keyPattern?: string;
464
+ order?: {
465
+ type?: ("asc" | "desc");
466
+ caseSensitive?: boolean;
467
+ natural?: boolean;
468
+ };
469
+ })[] | {
470
+ type?: ("asc" | "desc");
471
+ caseSensitive?: boolean;
472
+ natural?: boolean;
473
+ });
474
+ minKeys?: number;
475
+ allowLineSeparatedGroups?: boolean;
476
+ },
477
+ ...({
478
+ pathPattern: string;
479
+ hasProperties?: string[];
480
+ order: ((string | {
481
+ keyPattern?: string;
482
+ order?: {
483
+ type?: ("asc" | "desc");
484
+ caseSensitive?: boolean;
485
+ natural?: boolean;
486
+ };
487
+ })[] | {
488
+ type?: ("asc" | "desc");
489
+ caseSensitive?: boolean;
490
+ natural?: boolean;
491
+ });
492
+ minKeys?: number;
493
+ allowLineSeparatedGroups?: boolean;
494
+ })[]
495
+ ] | [] | [("asc" | "desc")] | [
496
+ ("asc" | "desc"),
497
+ {
498
+ caseSensitive?: boolean;
499
+ natural?: boolean;
500
+ minKeys?: number;
501
+ allowLineSeparatedGroups?: boolean;
502
+ }
503
+ ]);
504
+ type JsoncSpaceUnaryOps = [] | [
505
+ {
506
+ words?: boolean;
507
+ nonwords?: boolean;
508
+ overrides?: {
509
+ [k: string]: boolean | undefined;
510
+ };
511
+ }
512
+ ];
513
+ export {};
@@ -0,0 +1,2 @@
1
+ export interface PrettierRules {
2
+ }
@@ -0,0 +1,2 @@
1
+ export interface PrettierRules {
2
+ }
@@ -0,0 +1,107 @@
1
+ import type { Linter } from 'eslint';
2
+ export interface PromiseRules {
3
+ /**
4
+ * Require returning inside each `then()` to create readable and reusable Promise chains.
5
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/always-return.md
6
+ */
7
+ 'promise/always-return'?: Linter.RuleEntry<PromiseAlwaysReturn>;
8
+ /**
9
+ * Disallow creating `new` promises outside of utility libs (use [pify][] instead).
10
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/avoid-new.md
11
+ */
12
+ 'promise/avoid-new'?: Linter.RuleEntry<[]>;
13
+ /**
14
+ * Enforce the use of `catch()` on un-returned promises.
15
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/catch-or-return.md
16
+ */
17
+ 'promise/catch-or-return'?: Linter.RuleEntry<PromiseCatchOrReturn>;
18
+ /**
19
+ * Disallow calling `cb()` inside of a `then()` (use [nodeify][] instead).
20
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-callback-in-promise.md
21
+ */
22
+ 'promise/no-callback-in-promise'?: Linter.RuleEntry<PromiseNoCallbackInPromise>;
23
+ /**
24
+ * Disallow creating new promises with paths that resolve multiple times.
25
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-multiple-resolved.md
26
+ */
27
+ 'promise/no-multiple-resolved'?: Linter.RuleEntry<[]>;
28
+ /**
29
+ * Require creating a `Promise` constructor before using it in an ES5 environment.
30
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-native.md
31
+ */
32
+ 'promise/no-native'?: Linter.RuleEntry<[]>;
33
+ /**
34
+ * Disallow nested `then()` or `catch()` statements.
35
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-nesting.md
36
+ */
37
+ 'promise/no-nesting'?: Linter.RuleEntry<[]>;
38
+ /**
39
+ * Disallow calling `new` on a Promise static method.
40
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-new-statics.md
41
+ */
42
+ 'promise/no-new-statics'?: Linter.RuleEntry<[]>;
43
+ /**
44
+ * Disallow using promises inside of callbacks.
45
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-promise-in-callback.md
46
+ */
47
+ 'promise/no-promise-in-callback'?: Linter.RuleEntry<[]>;
48
+ /**
49
+ * Disallow return statements in `finally()`.
50
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-in-finally.md
51
+ */
52
+ 'promise/no-return-in-finally'?: Linter.RuleEntry<[]>;
53
+ /**
54
+ * Disallow wrapping values in `Promise.resolve` or `Promise.reject` when not needed.
55
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-wrap.md
56
+ */
57
+ 'promise/no-return-wrap'?: Linter.RuleEntry<PromiseNoReturnWrap>;
58
+ /**
59
+ * Enforce consistent param names and ordering when creating new promises.
60
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/param-names.md
61
+ */
62
+ 'promise/param-names'?: Linter.RuleEntry<PromiseParamNames>;
63
+ /**
64
+ * Prefer async/await to the callback pattern.
65
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-callbacks.md
66
+ */
67
+ 'promise/prefer-await-to-callbacks'?: Linter.RuleEntry<[]>;
68
+ /**
69
+ * Prefer `await` to `then()`/`catch()`/`finally()` for reading Promise values.
70
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-then.md
71
+ */
72
+ 'promise/prefer-await-to-then'?: Linter.RuleEntry<[]>;
73
+ /**
74
+ * Enforces the proper number of arguments are passed to Promise functions.
75
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/valid-params.md
76
+ */
77
+ 'promise/valid-params'?: Linter.RuleEntry<[]>;
78
+ }
79
+ type PromiseAlwaysReturn = [] | [
80
+ {
81
+ ignoreLastCallback?: boolean;
82
+ }
83
+ ];
84
+ type PromiseCatchOrReturn = [] | [
85
+ {
86
+ allowFinally?: boolean;
87
+ allowThen?: boolean;
88
+ terminationMethod?: (string | string[]);
89
+ }
90
+ ];
91
+ type PromiseNoCallbackInPromise = [] | [
92
+ {
93
+ exceptions?: string[];
94
+ }
95
+ ];
96
+ type PromiseNoReturnWrap = [] | [
97
+ {
98
+ allowReject?: boolean;
99
+ }
100
+ ];
101
+ type PromiseParamNames = [] | [
102
+ {
103
+ resolvePattern?: string;
104
+ rejectPattern?: string;
105
+ }
106
+ ];
107
+ export {};