@favorodera/eslint-config 0.0.2 → 0.0.3
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.
- package/dist/index.cjs +408 -73
- package/dist/index.d.cts +480 -4
- package/dist/index.d.mts +480 -4
- package/dist/index.mjs +408 -73
- package/package.json +30 -27
package/dist/index.d.mts
CHANGED
|
@@ -335,6 +335,226 @@ interface RuleOptions {
|
|
|
335
335
|
* @see https://eslint.org/docs/latest/rules/init-declarations
|
|
336
336
|
*/
|
|
337
337
|
'init-declarations'?: Linter.RuleEntry<InitDeclarations>;
|
|
338
|
+
/**
|
|
339
|
+
* enforce line breaks after opening and before closing array brackets
|
|
340
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-newline.html
|
|
341
|
+
*/
|
|
342
|
+
'jsonc/array-bracket-newline'?: Linter.RuleEntry<JsoncArrayBracketNewline>;
|
|
343
|
+
/**
|
|
344
|
+
* disallow or enforce spaces inside of brackets
|
|
345
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-spacing.html
|
|
346
|
+
*/
|
|
347
|
+
'jsonc/array-bracket-spacing'?: Linter.RuleEntry<JsoncArrayBracketSpacing>;
|
|
348
|
+
/**
|
|
349
|
+
* enforce line breaks between array elements
|
|
350
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-element-newline.html
|
|
351
|
+
*/
|
|
352
|
+
'jsonc/array-element-newline'?: Linter.RuleEntry<JsoncArrayElementNewline>;
|
|
353
|
+
/**
|
|
354
|
+
* apply jsonc rules similar to your configured ESLint core rules
|
|
355
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/auto.html
|
|
356
|
+
*/
|
|
357
|
+
'jsonc/auto'?: Linter.RuleEntry<[]>;
|
|
358
|
+
/**
|
|
359
|
+
* require or disallow trailing commas
|
|
360
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-dangle.html
|
|
361
|
+
*/
|
|
362
|
+
'jsonc/comma-dangle'?: Linter.RuleEntry<JsoncCommaDangle>;
|
|
363
|
+
/**
|
|
364
|
+
* enforce consistent comma style
|
|
365
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-style.html
|
|
366
|
+
*/
|
|
367
|
+
'jsonc/comma-style'?: Linter.RuleEntry<JsoncCommaStyle>;
|
|
368
|
+
/**
|
|
369
|
+
* enforce consistent indentation
|
|
370
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/indent.html
|
|
371
|
+
*/
|
|
372
|
+
'jsonc/indent'?: Linter.RuleEntry<JsoncIndent>;
|
|
373
|
+
/**
|
|
374
|
+
* enforce naming convention to property key names
|
|
375
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-name-casing.html
|
|
376
|
+
*/
|
|
377
|
+
'jsonc/key-name-casing'?: Linter.RuleEntry<JsoncKeyNameCasing>;
|
|
378
|
+
/**
|
|
379
|
+
* enforce consistent spacing between keys and values in object literal properties
|
|
380
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-spacing.html
|
|
381
|
+
*/
|
|
382
|
+
'jsonc/key-spacing'?: Linter.RuleEntry<JsoncKeySpacing>;
|
|
383
|
+
/**
|
|
384
|
+
* disallow BigInt literals
|
|
385
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-bigint-literals.html
|
|
386
|
+
*/
|
|
387
|
+
'jsonc/no-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
388
|
+
/**
|
|
389
|
+
* disallow binary expression
|
|
390
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-expression.html
|
|
391
|
+
*/
|
|
392
|
+
'jsonc/no-binary-expression'?: Linter.RuleEntry<[]>;
|
|
393
|
+
/**
|
|
394
|
+
* disallow binary numeric literals
|
|
395
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-numeric-literals.html
|
|
396
|
+
*/
|
|
397
|
+
'jsonc/no-binary-numeric-literals'?: Linter.RuleEntry<[]>;
|
|
398
|
+
/**
|
|
399
|
+
* disallow comments
|
|
400
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-comments.html
|
|
401
|
+
*/
|
|
402
|
+
'jsonc/no-comments'?: Linter.RuleEntry<[]>;
|
|
403
|
+
/**
|
|
404
|
+
* disallow duplicate keys in object literals
|
|
405
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-dupe-keys.html
|
|
406
|
+
*/
|
|
407
|
+
'jsonc/no-dupe-keys'?: Linter.RuleEntry<[]>;
|
|
408
|
+
/**
|
|
409
|
+
* disallow escape sequences in identifiers.
|
|
410
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-escape-sequence-in-identifier.html
|
|
411
|
+
*/
|
|
412
|
+
'jsonc/no-escape-sequence-in-identifier'?: Linter.RuleEntry<[]>;
|
|
413
|
+
/**
|
|
414
|
+
* disallow leading or trailing decimal points in numeric literals
|
|
415
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-floating-decimal.html
|
|
416
|
+
*/
|
|
417
|
+
'jsonc/no-floating-decimal'?: Linter.RuleEntry<[]>;
|
|
418
|
+
/**
|
|
419
|
+
* disallow hexadecimal numeric literals
|
|
420
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-hexadecimal-numeric-literals.html
|
|
421
|
+
*/
|
|
422
|
+
'jsonc/no-hexadecimal-numeric-literals'?: Linter.RuleEntry<[]>;
|
|
423
|
+
/**
|
|
424
|
+
* disallow Infinity
|
|
425
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-infinity.html
|
|
426
|
+
*/
|
|
427
|
+
'jsonc/no-infinity'?: Linter.RuleEntry<[]>;
|
|
428
|
+
/**
|
|
429
|
+
* disallow irregular whitespace
|
|
430
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html
|
|
431
|
+
*/
|
|
432
|
+
'jsonc/no-irregular-whitespace'?: Linter.RuleEntry<JsoncNoIrregularWhitespace>;
|
|
433
|
+
/**
|
|
434
|
+
* disallow multiline strings
|
|
435
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-multi-str.html
|
|
436
|
+
*/
|
|
437
|
+
'jsonc/no-multi-str'?: Linter.RuleEntry<[]>;
|
|
438
|
+
/**
|
|
439
|
+
* disallow NaN
|
|
440
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-nan.html
|
|
441
|
+
*/
|
|
442
|
+
'jsonc/no-nan'?: Linter.RuleEntry<[]>;
|
|
443
|
+
/**
|
|
444
|
+
* disallow number property keys
|
|
445
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-number-props.html
|
|
446
|
+
*/
|
|
447
|
+
'jsonc/no-number-props'?: Linter.RuleEntry<[]>;
|
|
448
|
+
/**
|
|
449
|
+
* disallow numeric separators
|
|
450
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-numeric-separators.html
|
|
451
|
+
*/
|
|
452
|
+
'jsonc/no-numeric-separators'?: Linter.RuleEntry<[]>;
|
|
453
|
+
/**
|
|
454
|
+
* disallow legacy octal literals
|
|
455
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal.html
|
|
456
|
+
*/
|
|
457
|
+
'jsonc/no-octal'?: Linter.RuleEntry<[]>;
|
|
458
|
+
/**
|
|
459
|
+
* disallow octal escape sequences in string literals
|
|
460
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-escape.html
|
|
461
|
+
*/
|
|
462
|
+
'jsonc/no-octal-escape'?: Linter.RuleEntry<[]>;
|
|
463
|
+
/**
|
|
464
|
+
* disallow octal numeric literals
|
|
465
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-numeric-literals.html
|
|
466
|
+
*/
|
|
467
|
+
'jsonc/no-octal-numeric-literals'?: Linter.RuleEntry<[]>;
|
|
468
|
+
/**
|
|
469
|
+
* disallow parentheses around the expression
|
|
470
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-parenthesized.html
|
|
471
|
+
*/
|
|
472
|
+
'jsonc/no-parenthesized'?: Linter.RuleEntry<[]>;
|
|
473
|
+
/**
|
|
474
|
+
* disallow plus sign
|
|
475
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-plus-sign.html
|
|
476
|
+
*/
|
|
477
|
+
'jsonc/no-plus-sign'?: Linter.RuleEntry<[]>;
|
|
478
|
+
/**
|
|
479
|
+
* disallow RegExp literals
|
|
480
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-regexp-literals.html
|
|
481
|
+
*/
|
|
482
|
+
'jsonc/no-regexp-literals'?: Linter.RuleEntry<[]>;
|
|
483
|
+
/**
|
|
484
|
+
* disallow sparse arrays
|
|
485
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-sparse-arrays.html
|
|
486
|
+
*/
|
|
487
|
+
'jsonc/no-sparse-arrays'?: Linter.RuleEntry<[]>;
|
|
488
|
+
/**
|
|
489
|
+
* disallow template literals
|
|
490
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-template-literals.html
|
|
491
|
+
*/
|
|
492
|
+
'jsonc/no-template-literals'?: Linter.RuleEntry<[]>;
|
|
493
|
+
/**
|
|
494
|
+
* disallow `undefined`
|
|
495
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-undefined-value.html
|
|
496
|
+
*/
|
|
497
|
+
'jsonc/no-undefined-value'?: Linter.RuleEntry<[]>;
|
|
498
|
+
/**
|
|
499
|
+
* disallow Unicode code point escape sequences.
|
|
500
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-unicode-codepoint-escapes.html
|
|
501
|
+
*/
|
|
502
|
+
'jsonc/no-unicode-codepoint-escapes'?: Linter.RuleEntry<[]>;
|
|
503
|
+
/**
|
|
504
|
+
* disallow unnecessary escape usage
|
|
505
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-useless-escape.html
|
|
506
|
+
*/
|
|
507
|
+
'jsonc/no-useless-escape'?: Linter.RuleEntry<JsoncNoUselessEscape>;
|
|
508
|
+
/**
|
|
509
|
+
* enforce consistent line breaks inside braces
|
|
510
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-newline.html
|
|
511
|
+
*/
|
|
512
|
+
'jsonc/object-curly-newline'?: Linter.RuleEntry<JsoncObjectCurlyNewline>;
|
|
513
|
+
/**
|
|
514
|
+
* enforce consistent spacing inside braces
|
|
515
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-spacing.html
|
|
516
|
+
*/
|
|
517
|
+
'jsonc/object-curly-spacing'?: Linter.RuleEntry<JsoncObjectCurlySpacing>;
|
|
518
|
+
/**
|
|
519
|
+
* enforce placing object properties on separate lines
|
|
520
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-property-newline.html
|
|
521
|
+
*/
|
|
522
|
+
'jsonc/object-property-newline'?: Linter.RuleEntry<JsoncObjectPropertyNewline>;
|
|
523
|
+
/**
|
|
524
|
+
* require quotes around object literal property names
|
|
525
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quote-props.html
|
|
526
|
+
*/
|
|
527
|
+
'jsonc/quote-props'?: Linter.RuleEntry<JsoncQuoteProps>;
|
|
528
|
+
/**
|
|
529
|
+
* enforce use of double or single quotes
|
|
530
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quotes.html
|
|
531
|
+
*/
|
|
532
|
+
'jsonc/quotes'?: Linter.RuleEntry<JsoncQuotes>;
|
|
533
|
+
/**
|
|
534
|
+
* require array values to be sorted
|
|
535
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-array-values.html
|
|
536
|
+
*/
|
|
537
|
+
'jsonc/sort-array-values'?: Linter.RuleEntry<JsoncSortArrayValues>;
|
|
538
|
+
/**
|
|
539
|
+
* require object keys to be sorted
|
|
540
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-keys.html
|
|
541
|
+
*/
|
|
542
|
+
'jsonc/sort-keys'?: Linter.RuleEntry<JsoncSortKeys>;
|
|
543
|
+
/**
|
|
544
|
+
* disallow spaces after unary operators
|
|
545
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/space-unary-ops.html
|
|
546
|
+
*/
|
|
547
|
+
'jsonc/space-unary-ops'?: Linter.RuleEntry<JsoncSpaceUnaryOps>;
|
|
548
|
+
/**
|
|
549
|
+
* disallow invalid number for JSON
|
|
550
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/valid-json-number.html
|
|
551
|
+
*/
|
|
552
|
+
'jsonc/valid-json-number'?: Linter.RuleEntry<[]>;
|
|
553
|
+
/**
|
|
554
|
+
* disallow parsing errors in Vue custom blocks
|
|
555
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/vue-custom-block/no-parsing-error.html
|
|
556
|
+
*/
|
|
557
|
+
'jsonc/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]>;
|
|
338
558
|
/**
|
|
339
559
|
* Enforce the consistent use of either double or single quotes in JSX attributes
|
|
340
560
|
* @see https://eslint.org/docs/latest/rules/jsx-quotes
|
|
@@ -4473,7 +4693,255 @@ type IndentLegacy = [] | [("tab" | number)] | [("tab" | number), {
|
|
|
4473
4693
|
}]; // ----- init-declarations -----
|
|
4474
4694
|
type InitDeclarations = ([] | ["always"] | [] | ["never"] | ["never", {
|
|
4475
4695
|
ignoreForLoopInit?: boolean;
|
|
4476
|
-
}]); // -----
|
|
4696
|
+
}]); // ----- jsonc/array-bracket-newline -----
|
|
4697
|
+
type JsoncArrayBracketNewline = [] | [(("always" | "never" | "consistent") | {
|
|
4698
|
+
multiline?: boolean;
|
|
4699
|
+
minItems?: (number | null);
|
|
4700
|
+
})]; // ----- jsonc/array-bracket-spacing -----
|
|
4701
|
+
type JsoncArrayBracketSpacing = [] | [("always" | "never")] | [("always" | "never"), {
|
|
4702
|
+
singleValue?: boolean;
|
|
4703
|
+
objectsInArrays?: boolean;
|
|
4704
|
+
arraysInArrays?: boolean;
|
|
4705
|
+
}]; // ----- jsonc/array-element-newline -----
|
|
4706
|
+
type JsoncArrayElementNewline = [] | [(_JsoncArrayElementNewlineBasicConfig | {
|
|
4707
|
+
ArrayExpression?: _JsoncArrayElementNewlineBasicConfig;
|
|
4708
|
+
JSONArrayExpression?: _JsoncArrayElementNewlineBasicConfig;
|
|
4709
|
+
ArrayPattern?: _JsoncArrayElementNewlineBasicConfig;
|
|
4710
|
+
})];
|
|
4711
|
+
type _JsoncArrayElementNewlineBasicConfig = (("always" | "never" | "consistent") | {
|
|
4712
|
+
multiline?: boolean;
|
|
4713
|
+
minItems?: (number | null);
|
|
4714
|
+
}); // ----- jsonc/comma-dangle -----
|
|
4715
|
+
type JsoncCommaDangle = [] | [(_JsoncCommaDangleValue | {
|
|
4716
|
+
arrays?: _JsoncCommaDangleValueWithIgnore;
|
|
4717
|
+
objects?: _JsoncCommaDangleValueWithIgnore;
|
|
4718
|
+
imports?: _JsoncCommaDangleValueWithIgnore;
|
|
4719
|
+
exports?: _JsoncCommaDangleValueWithIgnore;
|
|
4720
|
+
functions?: _JsoncCommaDangleValueWithIgnore;
|
|
4721
|
+
})];
|
|
4722
|
+
type _JsoncCommaDangleValue = ("always-multiline" | "always" | "never" | "only-multiline");
|
|
4723
|
+
type _JsoncCommaDangleValueWithIgnore = ("always-multiline" | "always" | "ignore" | "never" | "only-multiline"); // ----- jsonc/comma-style -----
|
|
4724
|
+
type JsoncCommaStyle = [] | [("first" | "last")] | [("first" | "last"), {
|
|
4725
|
+
exceptions?: {
|
|
4726
|
+
[k: string]: boolean | undefined;
|
|
4727
|
+
};
|
|
4728
|
+
}]; // ----- jsonc/indent -----
|
|
4729
|
+
type JsoncIndent = [] | [("tab" | number)] | [("tab" | number), {
|
|
4730
|
+
SwitchCase?: number;
|
|
4731
|
+
VariableDeclarator?: ((number | ("first" | "off")) | {
|
|
4732
|
+
var?: (number | ("first" | "off"));
|
|
4733
|
+
let?: (number | ("first" | "off"));
|
|
4734
|
+
const?: (number | ("first" | "off"));
|
|
4735
|
+
});
|
|
4736
|
+
outerIIFEBody?: (number | "off");
|
|
4737
|
+
MemberExpression?: (number | "off");
|
|
4738
|
+
FunctionDeclaration?: {
|
|
4739
|
+
parameters?: (number | ("first" | "off"));
|
|
4740
|
+
body?: number;
|
|
4741
|
+
};
|
|
4742
|
+
FunctionExpression?: {
|
|
4743
|
+
parameters?: (number | ("first" | "off"));
|
|
4744
|
+
body?: number;
|
|
4745
|
+
};
|
|
4746
|
+
StaticBlock?: {
|
|
4747
|
+
body?: number;
|
|
4748
|
+
};
|
|
4749
|
+
CallExpression?: {
|
|
4750
|
+
arguments?: (number | ("first" | "off"));
|
|
4751
|
+
};
|
|
4752
|
+
ArrayExpression?: (number | ("first" | "off"));
|
|
4753
|
+
ObjectExpression?: (number | ("first" | "off"));
|
|
4754
|
+
ImportDeclaration?: (number | ("first" | "off"));
|
|
4755
|
+
flatTernaryExpressions?: boolean;
|
|
4756
|
+
offsetTernaryExpressions?: boolean;
|
|
4757
|
+
ignoredNodes?: string[];
|
|
4758
|
+
ignoreComments?: boolean;
|
|
4759
|
+
}]; // ----- jsonc/key-name-casing -----
|
|
4760
|
+
type JsoncKeyNameCasing = [] | [{
|
|
4761
|
+
camelCase?: boolean;
|
|
4762
|
+
PascalCase?: boolean;
|
|
4763
|
+
SCREAMING_SNAKE_CASE?: boolean;
|
|
4764
|
+
"kebab-case"?: boolean;
|
|
4765
|
+
snake_case?: boolean;
|
|
4766
|
+
ignores?: string[];
|
|
4767
|
+
}]; // ----- jsonc/key-spacing -----
|
|
4768
|
+
type JsoncKeySpacing = [] | [({
|
|
4769
|
+
align?: (("colon" | "value") | {
|
|
4770
|
+
mode?: ("strict" | "minimum");
|
|
4771
|
+
on?: ("colon" | "value");
|
|
4772
|
+
beforeColon?: boolean;
|
|
4773
|
+
afterColon?: boolean;
|
|
4774
|
+
});
|
|
4775
|
+
mode?: ("strict" | "minimum");
|
|
4776
|
+
beforeColon?: boolean;
|
|
4777
|
+
afterColon?: boolean;
|
|
4778
|
+
} | {
|
|
4779
|
+
singleLine?: {
|
|
4780
|
+
mode?: ("strict" | "minimum");
|
|
4781
|
+
beforeColon?: boolean;
|
|
4782
|
+
afterColon?: boolean;
|
|
4783
|
+
};
|
|
4784
|
+
multiLine?: {
|
|
4785
|
+
align?: (("colon" | "value") | {
|
|
4786
|
+
mode?: ("strict" | "minimum");
|
|
4787
|
+
on?: ("colon" | "value");
|
|
4788
|
+
beforeColon?: boolean;
|
|
4789
|
+
afterColon?: boolean;
|
|
4790
|
+
});
|
|
4791
|
+
mode?: ("strict" | "minimum");
|
|
4792
|
+
beforeColon?: boolean;
|
|
4793
|
+
afterColon?: boolean;
|
|
4794
|
+
};
|
|
4795
|
+
} | {
|
|
4796
|
+
singleLine?: {
|
|
4797
|
+
mode?: ("strict" | "minimum");
|
|
4798
|
+
beforeColon?: boolean;
|
|
4799
|
+
afterColon?: boolean;
|
|
4800
|
+
};
|
|
4801
|
+
multiLine?: {
|
|
4802
|
+
mode?: ("strict" | "minimum");
|
|
4803
|
+
beforeColon?: boolean;
|
|
4804
|
+
afterColon?: boolean;
|
|
4805
|
+
};
|
|
4806
|
+
align?: {
|
|
4807
|
+
mode?: ("strict" | "minimum");
|
|
4808
|
+
on?: ("colon" | "value");
|
|
4809
|
+
beforeColon?: boolean;
|
|
4810
|
+
afterColon?: boolean;
|
|
4811
|
+
};
|
|
4812
|
+
})]; // ----- jsonc/no-irregular-whitespace -----
|
|
4813
|
+
type JsoncNoIrregularWhitespace = [] | [{
|
|
4814
|
+
skipComments?: boolean;
|
|
4815
|
+
skipStrings?: boolean;
|
|
4816
|
+
skipTemplates?: boolean;
|
|
4817
|
+
skipRegExps?: boolean;
|
|
4818
|
+
skipJSXText?: boolean;
|
|
4819
|
+
}]; // ----- jsonc/no-useless-escape -----
|
|
4820
|
+
type JsoncNoUselessEscape = [] | [{
|
|
4821
|
+
allowRegexCharacters?: string[];
|
|
4822
|
+
}]; // ----- jsonc/object-curly-newline -----
|
|
4823
|
+
type JsoncObjectCurlyNewline = [] | [((("always" | "never") | {
|
|
4824
|
+
multiline?: boolean;
|
|
4825
|
+
minProperties?: number;
|
|
4826
|
+
consistent?: boolean;
|
|
4827
|
+
}) | {
|
|
4828
|
+
ObjectExpression?: (("always" | "never") | {
|
|
4829
|
+
multiline?: boolean;
|
|
4830
|
+
minProperties?: number;
|
|
4831
|
+
consistent?: boolean;
|
|
4832
|
+
});
|
|
4833
|
+
ObjectPattern?: (("always" | "never") | {
|
|
4834
|
+
multiline?: boolean;
|
|
4835
|
+
minProperties?: number;
|
|
4836
|
+
consistent?: boolean;
|
|
4837
|
+
});
|
|
4838
|
+
ImportDeclaration?: (("always" | "never") | {
|
|
4839
|
+
multiline?: boolean;
|
|
4840
|
+
minProperties?: number;
|
|
4841
|
+
consistent?: boolean;
|
|
4842
|
+
});
|
|
4843
|
+
ExportDeclaration?: (("always" | "never") | {
|
|
4844
|
+
multiline?: boolean;
|
|
4845
|
+
minProperties?: number;
|
|
4846
|
+
consistent?: boolean;
|
|
4847
|
+
});
|
|
4848
|
+
})]; // ----- jsonc/object-curly-spacing -----
|
|
4849
|
+
type JsoncObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
|
|
4850
|
+
arraysInObjects?: boolean;
|
|
4851
|
+
objectsInObjects?: boolean;
|
|
4852
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
4853
|
+
}]; // ----- jsonc/object-property-newline -----
|
|
4854
|
+
type JsoncObjectPropertyNewline = [] | [{
|
|
4855
|
+
allowAllPropertiesOnSameLine?: boolean;
|
|
4856
|
+
allowMultiplePropertiesPerLine?: boolean;
|
|
4857
|
+
}]; // ----- jsonc/quote-props -----
|
|
4858
|
+
type JsoncQuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
|
|
4859
|
+
keywords?: boolean;
|
|
4860
|
+
unnecessary?: boolean;
|
|
4861
|
+
numbers?: boolean;
|
|
4862
|
+
}]); // ----- jsonc/quotes -----
|
|
4863
|
+
type JsoncQuotes = [] | [("single" | "double" | "backtick")] | [("single" | "double" | "backtick"), ("avoid-escape" | {
|
|
4864
|
+
avoidEscape?: boolean;
|
|
4865
|
+
allowTemplateLiterals?: boolean;
|
|
4866
|
+
})]; // ----- jsonc/sort-array-values -----
|
|
4867
|
+
type JsoncSortArrayValues = [{
|
|
4868
|
+
pathPattern: string;
|
|
4869
|
+
order: ((string | {
|
|
4870
|
+
valuePattern?: string;
|
|
4871
|
+
order?: {
|
|
4872
|
+
type?: ("asc" | "desc");
|
|
4873
|
+
caseSensitive?: boolean;
|
|
4874
|
+
natural?: boolean;
|
|
4875
|
+
};
|
|
4876
|
+
})[] | {
|
|
4877
|
+
type?: ("asc" | "desc");
|
|
4878
|
+
caseSensitive?: boolean;
|
|
4879
|
+
natural?: boolean;
|
|
4880
|
+
});
|
|
4881
|
+
minValues?: number;
|
|
4882
|
+
}, ...({
|
|
4883
|
+
pathPattern: string;
|
|
4884
|
+
order: ((string | {
|
|
4885
|
+
valuePattern?: string;
|
|
4886
|
+
order?: {
|
|
4887
|
+
type?: ("asc" | "desc");
|
|
4888
|
+
caseSensitive?: boolean;
|
|
4889
|
+
natural?: boolean;
|
|
4890
|
+
};
|
|
4891
|
+
})[] | {
|
|
4892
|
+
type?: ("asc" | "desc");
|
|
4893
|
+
caseSensitive?: boolean;
|
|
4894
|
+
natural?: boolean;
|
|
4895
|
+
});
|
|
4896
|
+
minValues?: number;
|
|
4897
|
+
})[]]; // ----- jsonc/sort-keys -----
|
|
4898
|
+
type JsoncSortKeys = ([{
|
|
4899
|
+
pathPattern: string;
|
|
4900
|
+
hasProperties?: string[];
|
|
4901
|
+
order: ((string | {
|
|
4902
|
+
keyPattern?: string;
|
|
4903
|
+
order?: {
|
|
4904
|
+
type?: ("asc" | "desc");
|
|
4905
|
+
caseSensitive?: boolean;
|
|
4906
|
+
natural?: boolean;
|
|
4907
|
+
};
|
|
4908
|
+
})[] | {
|
|
4909
|
+
type?: ("asc" | "desc");
|
|
4910
|
+
caseSensitive?: boolean;
|
|
4911
|
+
natural?: boolean;
|
|
4912
|
+
});
|
|
4913
|
+
minKeys?: number;
|
|
4914
|
+
allowLineSeparatedGroups?: boolean;
|
|
4915
|
+
}, ...({
|
|
4916
|
+
pathPattern: string;
|
|
4917
|
+
hasProperties?: string[];
|
|
4918
|
+
order: ((string | {
|
|
4919
|
+
keyPattern?: string;
|
|
4920
|
+
order?: {
|
|
4921
|
+
type?: ("asc" | "desc");
|
|
4922
|
+
caseSensitive?: boolean;
|
|
4923
|
+
natural?: boolean;
|
|
4924
|
+
};
|
|
4925
|
+
})[] | {
|
|
4926
|
+
type?: ("asc" | "desc");
|
|
4927
|
+
caseSensitive?: boolean;
|
|
4928
|
+
natural?: boolean;
|
|
4929
|
+
});
|
|
4930
|
+
minKeys?: number;
|
|
4931
|
+
allowLineSeparatedGroups?: boolean;
|
|
4932
|
+
})[]] | [] | [("asc" | "desc")] | [("asc" | "desc"), {
|
|
4933
|
+
caseSensitive?: boolean;
|
|
4934
|
+
natural?: boolean;
|
|
4935
|
+
minKeys?: number;
|
|
4936
|
+
allowLineSeparatedGroups?: boolean;
|
|
4937
|
+
}]); // ----- jsonc/space-unary-ops -----
|
|
4938
|
+
type JsoncSpaceUnaryOps = [] | [{
|
|
4939
|
+
words?: boolean;
|
|
4940
|
+
nonwords?: boolean;
|
|
4941
|
+
overrides?: {
|
|
4942
|
+
[k: string]: boolean | undefined;
|
|
4943
|
+
};
|
|
4944
|
+
}]; // ----- jsx-quotes -----
|
|
4477
4945
|
type JsxQuotes = [] | [("prefer-single" | "prefer-double")]; // ----- key-spacing -----
|
|
4478
4946
|
type KeySpacing = [] | [({
|
|
4479
4947
|
align?: (("colon" | "value") | {
|
|
@@ -11549,7 +12017,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
11549
12017
|
exceptRange?: boolean;
|
|
11550
12018
|
onlyEquality?: boolean;
|
|
11551
12019
|
}]; // Names of all the configs
|
|
11552
|
-
type ConfigNames = 'favorodera/ignores' | 'favorodera/vue' | 'favorodera/typescript' | 'favorodera/stylistic' | 'favorodera/tailwind' | 'favorodera/imports' | 'favorodera/markdown' | 'favorodera/javascript';
|
|
12020
|
+
type ConfigNames = 'favorodera/ignores' | 'favorodera/vue/setup' | 'favorodera/vue/rules' | 'favorodera/typescript/setup' | 'favorodera/typescript/rules' | 'favorodera/stylistic/setup' | 'favorodera/stylistic/rules' | 'favorodera/tailwind/setup' | 'favorodera/tailwind/rules' | 'favorodera/imports/setup' | 'favorodera/imports/rules' | 'favorodera/markdown/setup' | 'favorodera/markdown/rules' | 'favorodera/markdown/disables/code' | 'favorodera/javascript/setup' | 'favorodera/javascript/rules' | 'favorodera/jsonc/setup' | 'favorodera/jsonc/rules' | 'favorodera/jsonc/sort/package-json' | 'favorodera/jsonc/sort/tsconfig-json';
|
|
11553
12021
|
//#endregion
|
|
11554
12022
|
//#region src/types/utils.d.ts
|
|
11555
12023
|
/** ESLint rules configuration with type-safe autocompletion */
|
|
@@ -11578,7 +12046,7 @@ interface SharedOptions {
|
|
|
11578
12046
|
/** Override rules configuration */
|
|
11579
12047
|
overrides?: TypedFlatConfigItem['rules'];
|
|
11580
12048
|
/** File glob patterns to apply configuration to */
|
|
11581
|
-
files?: string
|
|
12049
|
+
files?: Array<string>;
|
|
11582
12050
|
}
|
|
11583
12051
|
//#endregion
|
|
11584
12052
|
//#region src/configs/vue.d.ts
|
|
@@ -11591,7 +12059,7 @@ type VueConfigOptions = SharedOptions & {
|
|
|
11591
12059
|
* Patterns used to ignore files and directories from ESLint scanning.
|
|
11592
12060
|
* Can be a list of glob patterns or a function that receives default patterns.
|
|
11593
12061
|
*/
|
|
11594
|
-
type IgnoresPatterns = string
|
|
12062
|
+
type IgnoresPatterns = Array<string> | ((defaults: Array<string>) => Array<string>);
|
|
11595
12063
|
//#endregion
|
|
11596
12064
|
//#region src/configs/imports.d.ts
|
|
11597
12065
|
type ImportsConfigOptions = SharedOptions;
|
|
@@ -11654,6 +12122,9 @@ type TailwindConfigOptions = SharedOptions & {
|
|
|
11654
12122
|
//#region src/configs/typescript.d.ts
|
|
11655
12123
|
type TypescriptConfigOptions = SharedOptions;
|
|
11656
12124
|
//#endregion
|
|
12125
|
+
//#region src/configs/jsonc.d.ts
|
|
12126
|
+
type JSONCConfigOptions = SharedOptions;
|
|
12127
|
+
//#endregion
|
|
11657
12128
|
//#region src/factory.d.ts
|
|
11658
12129
|
/** Configuration options for the ESLint flat config */
|
|
11659
12130
|
interface ConfigOptions {
|
|
@@ -11697,6 +12168,11 @@ interface ConfigOptions {
|
|
|
11697
12168
|
* @default true
|
|
11698
12169
|
*/
|
|
11699
12170
|
javascript?: boolean | JavascriptConfigOptions;
|
|
12171
|
+
/**
|
|
12172
|
+
* Enable JSONC/JSON/JSON5 linting with optional configuration
|
|
12173
|
+
* @default true
|
|
12174
|
+
*/
|
|
12175
|
+
jsonc?: boolean | JSONCConfigOptions;
|
|
11700
12176
|
}
|
|
11701
12177
|
/**
|
|
11702
12178
|
* Factory to create a flat ESLint config
|