@eslinted/core 12.0.0 → 13.0.0-rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. package/dist/factory/global.d.ts +26 -0
  2. package/dist/factory/global.d.ts.map +1 -0
  3. package/dist/factory/global.js +39 -0
  4. package/dist/factory/global.js.map +1 -0
  5. package/dist/factory/index.d.ts +1 -0
  6. package/dist/factory/index.d.ts.map +1 -1
  7. package/dist/factory/index.js +1 -0
  8. package/dist/factory/index.js.map +1 -1
  9. package/dist/factory/options/html.d.ts +1 -1
  10. package/dist/factory/options/html.d.ts.map +1 -1
  11. package/dist/factory/options/html.js.map +1 -1
  12. package/dist/factory/options/json.d.ts +1 -1
  13. package/dist/factory/options/json.d.ts.map +1 -1
  14. package/dist/factory/options/json.js.map +1 -1
  15. package/dist/factory/options/jsonc.d.ts +1 -1
  16. package/dist/factory/options/jsonc.d.ts.map +1 -1
  17. package/dist/factory/options/jsonc.js.map +1 -1
  18. package/dist/factory/options/option/index.d.ts +40 -2978
  19. package/dist/factory/options/option/index.d.ts.map +1 -1
  20. package/dist/factory/options/option/index.js.map +1 -1
  21. package/dist/factory/options/option/template/index.d.ts +10 -6
  22. package/dist/factory/options/option/template/index.d.ts.map +1 -1
  23. package/dist/factory/options/option/template/languageOptions.d.ts +6 -5
  24. package/dist/factory/options/option/template/languageOptions.d.ts.map +1 -1
  25. package/dist/factory/options/svelte.d.ts +1 -1
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +4 -26
  29. package/dist/index.js.map +1 -1
  30. package/dist/objects/config/global/system.d.ts +1 -1
  31. package/dist/objects/config/global/system.d.ts.map +1 -1
  32. package/dist/objects/config/scoped.d.ts +1 -5
  33. package/dist/objects/config/scoped.d.ts.map +1 -1
  34. package/dist/objects/rule/record/index.d.ts +1 -1
  35. package/dist/objects/rule/record/index.d.ts.map +1 -1
  36. package/package.json +1 -1
  37. package/src/factory/global.ts +43 -0
  38. package/src/factory/index.ts +1 -0
  39. package/src/factory/options/html.ts +1 -2
  40. package/src/factory/options/json.ts +1 -2
  41. package/src/factory/options/jsonc.ts +1 -2
  42. package/src/factory/options/option/index.ts +19 -16
  43. package/src/factory/options/option/template/index.ts +22 -7
  44. package/src/factory/options/option/template/languageOptions.ts +18 -13
  45. package/src/factory/options/svelte.ts +1 -1
  46. package/src/index.ts +15 -30
  47. package/src/objects/config/global/system.ts +11 -12
  48. package/src/objects/config/scoped.ts +1 -5
  49. package/src/objects/rule/record/index.ts +2 -1
  50. package/typings/common/literals/chars/alpha.d.ts +0 -4
  51. package/typings/common/literals/chars/digit.d.ts +0 -12
  52. package/typings/common/literals/chars/digits/base64.d.ts +0 -13
  53. package/typings/common/literals/chars/digits/hexchar.d.ts +0 -9
  54. package/typings/common/literals/chars/lower.d.ts +0 -1
  55. package/typings/common/literals/chars/upper.d.ts +0 -28
  56. package/typings/common/literals/numbers/base32.d.ts +0 -19
  57. package/typings/common/literals/numbers/base64.d.ts +0 -35
  58. package/typings/common/literals/numbers/binary.d.ts +0 -4
  59. package/typings/common/literals/numbers/decimal.d.ts +0 -5
  60. package/typings/common/literals/numbers/hexadecimal.d.ts +0 -10
  61. package/typings/common/literals/numbers/octal.d.ts +0 -7
  62. package/typings/common/literals/numbers/quatral.d.ts +0 -4
  63. package/typings/common/literals/numbers/ternary.d.ts +0 -4
  64. package/typings/common/primitive.d.ts +0 -5
  65. package/typings/common/tester.d.ts +0 -8
  66. package/typings/common/utility/constructor.d.ts +0 -3
  67. package/typings/common/utility/interface/identity.d.ts +0 -11
  68. package/typings/common/utility/interface/identity.spec.d.ts +0 -63
  69. package/typings/common/utility/interface/index.d.ts +0 -5
  70. package/typings/common/utility/interface/keys.d.ts +0 -3
  71. package/typings/common/utility/interface/keys.spec.d.ts +0 -67
  72. package/typings/common/utility/interface/optional.d.ts +0 -7
  73. package/typings/common/utility/interface/optional.spec.d.ts +0 -34
  74. package/typings/common/utility/interface/partially.d.ts +0 -1
  75. package/typings/common/utility/interface/property/index.d.ts +0 -8
  76. package/typings/common/utility/interface/property/properties.d.ts +0 -6
  77. package/typings/common/utility/interface/table/index.d.ts +0 -3
  78. package/typings/common/utility/interface/table/tables.d.ts +0 -5
  79. package/typings/common/utility/iterable/arrayful.d.ts +0 -1
  80. package/typings/common/utility/iterable/flat/index.d.ts +0 -3
  81. package/typings/common/utility/iterable/flat/unflat.d.ts +0 -3
  82. package/typings/common/utility/iterable/identity.d.ts +0 -1
  83. package/typings/common/utility/iterable/identity.spec.d.ts +0 -59
  84. package/typings/common/utility/iterable/index.d.ts +0 -15
  85. package/typings/common/utility/iterable/index.spec.d.ts +0 -18
  86. package/typings/common/utility/iterable/tuple.d.ts +0 -11
  87. package/typings/common/utility/iterable/tuple.spec.d.ts +0 -14
  88. package/typings/common/utility/iterable/tuples.d.ts +0 -10
  89. package/typings/common/utility/null/index.d.ts +0 -1
  90. package/typings/common/utility/null/index.spec.d.ts +0 -13
  91. package/typings/common/utility/null/nullable.d.ts +0 -1
  92. package/typings/common/utility/null/nullable.spec.d.ts +0 -13
  93. package/typings/common/utility/primitive/cast/number.d.ts +0 -13
  94. package/typings/common/utility/primitive/cast/number.spec.d.ts +0 -57
  95. package/typings/common/utility/primitive/index.d.ts +0 -11
  96. package/typings/common/utility/primitive/index.spec.d.ts +0 -27
  97. package/typings/common/utility/primitive/length.d.ts +0 -5
  98. package/typings/common/utility/primitive/length.spec.d.ts +0 -26
  99. package/typings/common/utility/primitive/literal.d.ts +0 -1
  100. package/typings/common/utility/primitive/literal.spec.d.ts +0 -17
  101. package/typings/common/utility/primitive/literalful.d.ts +0 -3
  102. package/typings/common/utility/primitive/literalful.spec.d.ts +0 -20
  103. package/typings/common/utility/primitive/numeric.d.ts +0 -1
  104. package/typings/common/utility/primitive/numeric.spec.d.ts +0 -30
  105. package/typings/common/utility/primitive/truth.d.ts +0 -3
  106. package/typings/common/utility/primitive/truth.spec.d.ts +0 -22
  107. package/typings/common/validated/char.d.ts +0 -1
  108. package/typings/common/validated/index.d.ts +0 -2
  109. package/typings/common/validated/numberful.d.ts +0 -1
  110. package/typings/common/validated/properties/finite.d.ts +0 -2
  111. package/typings/common/validated/properties/int.d.ts +0 -2
  112. package/typings/common/validated/properties/length.d.ts +0 -3
  113. package/typings/common/validated/properties/polarity.d.ts +0 -5
  114. package/typings/common/validated/stringful.d.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factory/options/option/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,KAAK,EACL,YAAY,EACb,MAAM,IAAI,CAAC;AACZ,OAAO,KAAK,EAEV,eAAe,EACf,OAAO,EACR,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,MAAM,CAClC,CAAC,SAAS,KAAK,EACf,aAAa,SACX,MAAM,GACN,OAAO,GAAG,KAAK,EACjB,WAAW,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EACjC,MAAM,SAAS,OAAO,GAAG,KAAK,EAC9B,SAAS,SAAS,MAAM,GAAG,KAAK,EAChC,QAAQ,SAAS,MAAM,GAAG,KAAK;aAeb,MAAM,EAAE,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC;aACnC,KAAK,EAAE,MAAM,EAAE;aACf,OAAO,EAAE,MAAM,EAAE;aACjB,OAAO,EAAE,OAAO;IAhBlC,kBAAyB,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC9C,kBAAyB,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,SAAS,KAAK,GAClE,MAAM,GACN,SAAS,CAAC,SAAS,CAAC,SAAS,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,GAChE,SAAS,CAAC,SAAS,CAAC,GACpB,MAAM,CAAC;IACb,kBAAyB,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAA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KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,GACP,GAAG,IAAI,CAAC;QAET,IAAI,OAAO,CAAC,KAAK,KAAK,KAAK;YACzB,MAAM,IAAI,SAAS,CAAC,2CAA2C,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEzH,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC;YACrB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;gBACtC,OAAO;oBACL,IAAI,EAAE,UAAU,EAAE,EAAE;oBACpB,KAAK;oBACL,OAAO;oBACP,KAAK;oBACL,GAAG,MAAM;iBACV,CAAC;YACJ,CAAC,CAAC,CAAC;IACP,CAAC;IAED,IAAY,MAAM;QAChB,IAAI,CAAC;YACH,MAAM,EACJ,eAAe,EACf,SAAS,EACT,QAAQ,GACT,GAAG,IAAI,CAAC;YAET,OAAO;gBACL,eAAe;gBACf,GAAG,SAAS;gBACZ,GAAG,QAAQ;aAMZ,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,CAAC,KAAK,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAAC,CAAC;IACnG,CAAC;IAIS,OAAO,CAAC,IAAY;QAC5B,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;CACF"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/factory/options/option/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAY9B,MAAM,CAAC,OAAO,OAAgB,MAAM;IA0BhB;IACA;IACA;IACA;IAJlB,YACkB,MAA2C,EAC3C,KAAe,EACf,O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
1
1
  import type { LanguageOptions } from "./languageOptions.js";
2
2
  import type { Globals } from "./globals.js";
3
3
  export type { LanguageOptions, Globals, };
4
- export type OptionTemplate<ParserOptions extends boolean | object, GlobalTypes extends Globals, Processor extends object, Language extends object> = {
4
+ export type OptionTemplate<ParserOptions extends boolean | object, GlobalTypes extends Globals | false, Processor extends object, Language extends object> = ({
5
5
  languageOptions: LanguageOptions<ParserOptions, GlobalTypes>;
6
- } & (Interface<Processor> extends never ? object : Interface<Processor> extends {
7
- processor: string;
8
- } ? Interface<Processor> : object) & (Interface<Language> extends never ? object : Interface<Language> extends {
9
- language: string;
10
- } ? Interface<Language> : object);
6
+ } & (Processor extends never ? object : Processor extends {
7
+ processor: infer P;
8
+ } ? string extends P ? object : {
9
+ processor: P;
10
+ } : object) & (Language extends never ? object : Language extends {
11
+ language: infer L;
12
+ } ? string extends L ? object : {
13
+ language: L;
14
+ } : object));
11
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,YAAY,EACV,eAAe,EACf,OAAO,GACR,CAAC;AACF,MAAM,MAAM,cAAc,CACxB,aAAa,SACX,OAAO,GACP,MAAM,EACR,WAAW,SAAS,OAAO,EAC3B,SAAS,SAAS,MAAM,EACxB,QAAQ,SAAS,MAAM,IAErB;IACA,eAAe,EAAE,eAAe,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;CAC9D,GACC,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,SAAS;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,GAClI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,SAAS;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,YAAY,EACV,eAAe,EACf,OAAO,GACR,CAAC;AACF,MAAM,MAAM,cAAc,CACxB,aAAa,SACX,OAAO,GACP,MAAM,EACR,WAAW,SAAS,OAAO,GAAG,KAAK,EACnC,SAAS,SAAS,MAAM,EACxB,QAAQ,SAAS,MAAM,IACrB,CACJ;IAAE,eAAe,EAAE,eAAe,CAAC,aAAa,EAAE,WAAW,CAAC,CAAA;CAAE,GAC9D,CACE,SAAS,SAAS,KAAK,GACnB,MAAM,GACN,SAAS,SAAS;IAAE,SAAS,EAAE,MAAM,CAAC,CAAA;CAAE,GACtC,MAAM,SAAS,CAAC,GACd,MAAM,GACN;IAAE,SAAS,EAAE,CAAC,CAAA;CAAE,GAClB,MAAM,CACX,GACC,CACF,QAAQ,SAAS,KAAK,GAClB,MAAM,GACN,QAAQ,SAAS;IAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;CAAE,GACpC,MAAM,SAAS,CAAC,GACd,MAAM,GACN;IAAE,QAAQ,EAAE,CAAC,CAAA;CAAE,GACjB,MAAM,CACX,CACJ,CAAC"}
@@ -1,9 +1,10 @@
1
- export type LanguageOptions<ParserOptions extends object | boolean, GlobalTypes extends string> = (literalful<GlobalTypes> extends never ? object : {
1
+ import type { Globals } from "./globals.js";
2
+ export type LanguageOptions<ParserOptions extends object | boolean, GlobalTypes extends Globals | false> = (GlobalTypes extends never ? object : GlobalTypes extends false ? object : {
2
3
  globals: Record<string, unknown>;
3
- }) & (ParserOptions extends boolean ? Truth<ParserOptions> extends never ? object : {
4
+ }) & (ParserOptions extends never ? object : ParserOptions extends boolean ? ParserOptions extends true ? {
4
5
  parser: unknown;
5
- } : ParserOptions extends object ? Interface<ParserOptions> extends never ? object : {
6
+ } : object : {
6
7
  parser: unknown;
7
8
  parserOptions: ParserOptions;
8
- } : object);
9
- //# sourceMappingURL=languageOptions.d.ts.map
9
+ });
10
+ //# sourceMappingURL=languageOptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"languageOptions.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/languageOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,CACzB,aAAa,SAAS,MAAM,GAAG,OAAO,EACtC,WAAW,SAAS,MAAM,IAEzB,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,KAAK,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC,GACvF,CACC,aAAa,SAAS,OAAO,GACzB,KAAK,CAAC,aAAa,CAAC,SAAS,KAAK,GAChC,MAAM,GACN;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GACrB,aAAa,SAAS,MAAM,GAC1B,SAAS,CAAC,aAAa,CAAC,SAAS,KAAK,GACpC,MAAM,GACN;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,aAAa,CAAA;CAAE,GACnD,MAAM,CACb,CAAC"}
1
+ {"version":3,"file":"languageOptions.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/languageOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,MAAM,eAAe,CACzB,aAAa,SAAS,MAAM,GAAG,OAAO,EACtC,WAAW,SAAS,OAAO,GAAG,KAAK,IAElC,CAAC,WAAW,SAAS,KAAK,GACxB,MAAM,GACN,WAAW,SAAS,KAAK,GACvB,MAAM,GACN;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAC1C,GACC,CACE,aAAa,SAAS,KAAK,GACvB,MAAM,GACN,aAAa,SAAS,OAAO,GAC3B,aAAa,SAAS,IAAI,GACxB;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GACnB,MAAM,GACR;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,aAAa,CAAA;CAAE,CACzD,CAAC"}
@@ -5,7 +5,7 @@ export default class Svelte extends Option<"svelte", {
5
5
  extraFileExtensions: readonly [
6
6
  ".svelte"
7
7
  ];
8
- } & Ts["option"]["languageOptions"]["parserOptions"], 2, never, {
8
+ } & Ts["option"]["languageOptions"]["parserOptions"], 2, false, {
9
9
  processor: "svelte/svelte";
10
10
  }> {
11
11
  readonly scope = "svelte";
package/dist/index.d.ts CHANGED
@@ -2,5 +2,5 @@ export type { Scope } from "./scopes/index.js";
2
2
  export type { Plugins, RuleEntry, RuleRecord, RuleState, GlobalConfigSystem, GlobalConfigIgnores, ScopedConfig, } from "./objects/index.js";
3
3
  import type { Input, Output } from "./interface/index.js";
4
4
  export type { Input, Output, };
5
- export default function (input: Input): Output;
5
+ export default function ({ plugins, parsers, settings, globals, files, ignores, rules, }: Input): Output;
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,YAAY,EACV,OAAO,EACP,SAAS,EACT,UAAU,EACV,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,GACb,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EACV,KAAK,EACL,MAAM,EACP,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,KAAK,EACL,MAAM,GACP,CAAC;AAQF,MAAM,CAAC,OAAO,WAAW,KAAK,EAAE,KAAK,GAAG,MAAM,CAuF7C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,YAAY,EACV,OAAO,EACP,SAAS,EACT,UAAU,EACV,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,GACb,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EACV,KAAK,EACL,MAAM,EACP,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,KAAK,EACL,MAAM,GACP,CAAC;AASF,MAAM,CAAC,OAAO,WACZ,EACE,OAAO,EACP,OAAO,EACP,QAAQ,EACR,OAAO,EACP,KAAK,EACL,OAAO,EACP,KAAK,GACN,EAAE,KAAK,GACP,MAAM,CA6DR"}
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { scopes } from "./scopes/index.js";
2
- import { Factory, Options, } from "./factory/index.js";
3
- export default function (input) {
2
+ import { Global, Factory, Options, } from "./factory/index.js";
3
+ export default function ({ plugins, parsers, settings, globals, files, ignores, rules, }) {
4
4
  try {
5
- const { plugins, parsers, settings, globals, files, ignores, rules, } = input, factory = new Factory(files, ignores, rules), options = {
5
+ const global = new Global(plugins, settings, globals), factory = new Factory(files, ignores, rules), options = {
6
6
  js: new Options
7
7
  .js([], ...factory.produce("js")).configs,
8
8
  ts: new Options
@@ -21,29 +21,7 @@ export default function (input) {
21
21
  .yml([parsers.yml], ...factory.produce("yml")).configs,
22
22
  };
23
23
  return [
24
- {
25
- name: "linted/global/settings",
26
- plugins,
27
- linterOptions: {
28
- noInlineConfig: settings.noInlineConfig,
29
- reportUnusedDisableDirectives: settings.reportUnusedDisableDirectives,
30
- },
31
- languageOptions: {
32
- sourceType: settings.sourceType,
33
- ecmaVersion: settings.ecmaVersion,
34
- },
35
- },
36
- {
37
- name: "linted/global/ignores",
38
- ignores: typeof globals.extend.ignores === "undefined" || globals.extend.ignores.length < 1
39
- ? globals.ignores.ignores
40
- : [
41
- ...globals.extend.inherit === false
42
- ? []
43
- : globals.ignores.ignores,
44
- ...globals.extend.ignores,
45
- ],
46
- },
24
+ ...global.configs,
47
25
  ...scopes.flatMap(scope => options[scope]),
48
26
  ];
49
27
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EACL,OAAO,EACP,OAAO,GACR,MAAM,WAAW,CAAC;AAEnB,MAAM,CAAC,OAAO,WAAW,KAAY;IACnC,IAAI,CAAC;QACH,MAAM,EACJ,OAAO,EACP,OAAO,EACP,QAAQ,EACR,OAAO,EACP,KAAK,EACL,OAAO,EACP,KAAK,GACN,GAAG,KAAK,EACT,OAAO,GAAG,IAAI,OAAO,CACnB,KAAK,EACL,OAAO,EACP,KAAK,CACN,EACD,OAAO,GAAiF;YACtF,EAAE,EAAE,IAAI,OAAO;iBACZ,EAAE,CACD,EAAE,EACF,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CACzB,CAAC,OAAO;YACX,EAAE,EAAE,IAAI,OAAO;iBACZ,EAAE,CACD,CAAC,OAAO,CAAC,EAAE,CAAC,EACZ,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CACzB,CAAC,OAAO;YACX,MAAM,EAAE,IAAI,OAAO;iBAChB,MAAM,CACL,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,EAC5B,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAC7B,CAAC,OAAO;YACX,KAAK,EAAE,IAAI,OAAO;iBACf,KAAK,CACJ,CAAC,OAAO,CAAC,EAAE,CAAC,EACZ,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CA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AAO;iBACf,KAAK,CACJ,CAAC,OAAO,CAAC,EAAE,CAAC,EACZ,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAC5B,CAAC,OAAO;YACX,IAAI,EAAE,IAAI,OAAO;iBACd,IAAI,CACH,CAAC,OAAO,CAAC,IAAI,CAAC,EACd,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAC3B,CAAC,OAAO;YACX,IAAI,EAAE,IAAI,OAAO;iBACd,IAAI,CACH,CAAC,OAAO,CAAC,KAAK,CAAC,EACf,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAC3B,CAAC,OAAO;YACX,KAAK,EAAE,IAAI,OAAO;iBACf,KAAK,CACJ,CAAC,OAAO,CAAC,KAAK,CAAC,EACf,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAC5B,CAAC,OAAO;YACX,GAAG,EAAE,IAAI,OAAO;iBACb,GAAG,CACF,CAAC,OAAO,CAAC,GAAG,CAAC,EACb,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAC1B,CAAC,OAAO;SACZ,CAAC;QAEF,OAAO;YACL,GAAG,MAAM,CAAC,OAAO;YACjB,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;SAC3C,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QAAC,MAAM,IAAI,KAAK,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAAC,CAAC;AAC7D,CAAC"}
@@ -8,7 +8,7 @@ export type GlobalConfigSystem = Partial<Record<Exclude<ConfigProperty, "name" |
8
8
  };
9
9
  languageOptions: {
10
10
  sourceType?: "module" | "script";
11
- ecmaVersion?: "latest" | 3 | 5 | ToNumber<`20${(15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24)}`>;
11
+ ecmaVersion?: "latest" | 3 | 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024;
12
12
  };
13
13
  };
14
14
  //# sourceMappingURL=system.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../../src/objects/config/global/system.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACf,MAAM,IAAI,CAAC;AAEZ,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAC7C,OAAO,CACL,cAAc,EACZ,MAAM,GACN,SAAS,GACT,eAAe,GACf,iBAAiB,CACpB,EACD,KAAK,CACN,CAAC,GAAG;IACH,IAAI,EAAE,wBAAwB,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE;QACb,cAAc,EAAE,OAAO,CAAC;QACxB,6BAA6B,EACzB,OAAO,GACP,MAAM,GACN,KAAK,CACR;KACF,CAAC;IACF,eAAe,EAAE;QACf,UAAU,CAAC,EACP,QAAQ,GACR,QAAQ,CACX;QACD,WAAW,CAAC,EACR,QAAQ,GACR,CAAC,GACD,CAAC,GACD,QAAQ,CAAC,KAAK,CACZ,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,CACL,EAAE,CAAC,CAAC;KACR,CAAC;CACH,CAAC"}
1
+ {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../../src/objects/config/global/system.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACf,MAAM,IAAI,CAAC;AAEZ,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAC7C,OAAO,CACL,cAAc,EACZ,MAAM,GACN,SAAS,GACT,eAAe,GACf,iBAAiB,CACpB,EACD,KAAK,CACN,CAAC,GAAG;IACH,IAAI,EAAE,wBAAwB,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE;QACb,cAAc,EAAE,OAAO,CAAC;QACxB,6BAA6B,EACzB,OAAO,GACP,MAAM,GACN,KAAK,CACR;KACF,CAAC;IACF,eAAe,EAAE;QACf,UAAU,CAAC,EACP,QAAQ,GACR,QAAQ,CACX;QACD,WAAW,CAAC,EACR,QAAQ,GACR,CAAC,GACD,CAAC,GACD,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CACP;KACF,CAAC;CACH,CAAC"}
@@ -4,11 +4,7 @@ export interface ScopedConfig {
4
4
  rules: RuleRecord;
5
5
  files: string[];
6
6
  ignores: string[];
7
- languageOptions: {
8
- parser?: unknown;
9
- parserOptions?: Table;
10
- globals?: Table<true>;
11
- };
7
+ languageOptions: object;
12
8
  processor?: string;
13
9
  language?: string;
14
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"scoped.d.ts","sourceRoot":"","sources":["../../../src/objects/config/scoped.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AAEpC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,MAAM,EAAE,CAAC;IACzB,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,eAAe,EAAE;QACf,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,aAAa,CAAC,EAAE,KAAK,CAAC;QACtB,OAAO,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;KACvB,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"scoped.d.ts","sourceRoot":"","sources":["../../../src/objects/config/scoped.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AAEpC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,MAAM,EAAE,CAAC;IACzB,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -1,6 +1,6 @@
1
1
  import type { RuleState } from "./state.js";
2
2
  export type { RuleState };
3
- export type RuleRecord = Table<RuleState | readonly [
3
+ export type RuleRecord = Record<string, RuleState | readonly [
4
4
  RuleState,
5
5
  ...unknown[]
6
6
  ]>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/objects/rule/record/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,YAAY,EAAE,SAAS,EAAE,CAAC;AAC1B,MAAM,MAAM,UAAU,GAAG,KAAK,CAC1B,SAAS,GACT,SAAS,CAAC,SAAS,EAAE,GAAG,OAAO,EAAE,CAAC,CACrC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/objects/rule/record/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,YAAY,EAAE,SAAS,EAAE,CAAC;AAC1B,MAAM,MAAM,UAAU,GAAG,MAAM,CAC7B,MAAM,EACJ,SAAS,GACT,SAAS,CAAC,SAAS,EAAE,GAAG,OAAO,EAAE,CAAC,CACrC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "_schemaVersion": "22.11.0",
3
3
  "name": "@eslinted/core",
4
- "version": "12.0.0",
4
+ "version": "13.0.0-rc.0",
5
5
  "description": "Core ESLint flat config factory npm package `linted`.",
6
6
  "keywords": [],
7
7
  "repository": "github:jimmy-zhening-luo/linted-core",
@@ -0,0 +1,43 @@
1
+ import type { Input } from ".";
2
+
3
+ export class Global {
4
+ constructor(
5
+ public readonly plugins: Input["plugins"],
6
+ public readonly settings: Input["settings"],
7
+ public readonly globals: Input["globals"],
8
+ ) {}
9
+
10
+ public get configs() {
11
+ const {
12
+ plugins,
13
+ settings,
14
+ globals,
15
+ } = this;
16
+
17
+ return [
18
+ {
19
+ name: "linted/global/settings",
20
+ plugins,
21
+ linterOptions: {
22
+ noInlineConfig: settings.noInlineConfig,
23
+ reportUnusedDisableDirectives: settings.reportUnusedDisableDirectives,
24
+ },
25
+ languageOptions: {
26
+ sourceType: settings.sourceType,
27
+ ecmaVersion: settings.ecmaVersion,
28
+ },
29
+ },
30
+ {
31
+ name: "linted/global/ignores",
32
+ ignores: typeof globals.extend.ignores === "undefined" || globals.extend.ignores.length < 1
33
+ ? globals.ignores.ignores
34
+ : [
35
+ ...globals.extend.inherit === false
36
+ ? []
37
+ : globals.ignores.ignores,
38
+ ...globals.extend.ignores,
39
+ ],
40
+ },
41
+ ] as const;
42
+ }
43
+ }
@@ -12,6 +12,7 @@ import { Rules } from "./rules";
12
12
  import Options from "./options";
13
13
 
14
14
  export { Options };
15
+ export { Global } from "./global";
15
16
  export class Factory {
16
17
  public readonly files: Files;
17
18
  public readonly ignores: Ignores;
@@ -2,8 +2,7 @@ import Option from "./option";
2
2
 
3
3
  export default class Html extends Option<
4
4
  "html",
5
- true,
6
- 1
5
+ true
7
6
  > {
8
7
  public readonly scope = "html";
9
8
  public readonly processor = {};
@@ -2,8 +2,7 @@ import Option from "./option";
2
2
 
3
3
  export default class Json extends Option<
4
4
  "json",
5
- true,
6
- 1
5
+ true
7
6
  > {
8
7
  public readonly scope = "json";
9
8
  public readonly processor = {};
@@ -2,8 +2,7 @@ import Option from "./option";
2
2
 
3
3
  export default class Jsonc extends Option<
4
4
  "jsonc",
5
- true,
6
- 1
5
+ true
7
6
  > {
8
7
  public readonly scope = "jsonc";
9
8
  public readonly processor = {};
@@ -15,25 +15,28 @@ export default abstract class Option<
15
15
  ParserOptions extends
16
16
  | object
17
17
  | boolean = false,
18
- ParserCount extends 0 | 1 | 2 = 0,
19
- Global extends Globals = never,
20
- Processor extends object = never,
21
- Language extends object = never,
18
+ ParserCount extends 0 | 1 | 2 = ParserOptions extends false ? 0 : 1,
19
+ Global extends Globals | false = false,
20
+ Processor extends object = object,
21
+ Language extends object = object,
22
22
  > {
23
- public abstract readonly scope: literalful<S>;
24
- public abstract readonly processor: Interface<Processor> extends never
23
+ public abstract readonly scope: S;
24
+ public abstract readonly processor: (Processor extends never
25
25
  ? object
26
- : Interface<Processor> extends Readonly<Record<"processor", string>>
27
- ? Interface<Processor>
28
- : object;
29
- public abstract readonly language: Interface<Language> extends never
26
+ : Processor extends { processor: infer P }
27
+ ? string extends P
28
+ ? object
29
+ : { processor: P }
30
+ : object);
31
+ public abstract readonly language: (Language extends never
30
32
  ? object
31
- : Interface<Language> extends Readonly<Record<"language", string>>
32
- ? Interface<Language>
33
- : object;
34
-
33
+ : Language extends { language: infer L }
34
+ ? string extends L
35
+ ? object
36
+ : { language: L }
37
+ : object);
35
38
  constructor(
36
- public readonly parser: Tuple<ParserCount, unknown>,
39
+ public readonly parser: unknown[] & { length: ParserCount },
37
40
  public readonly files: string[],
38
41
  public readonly ignores: string[],
39
42
  public readonly ruleset: Ruleset,
@@ -88,7 +91,7 @@ export default abstract class Option<
88
91
 
89
92
  protected abstract get languageOptions(): LanguageOptions<ParserOptions, Global>;
90
93
 
91
- protected globals(type: Global) {
94
+ protected globals(type: Globals) {
92
95
  return globals[type];
93
96
  }
94
97
  }
@@ -9,12 +9,27 @@ export type OptionTemplate<
9
9
  ParserOptions extends
10
10
  | boolean
11
11
  | object,
12
- GlobalTypes extends Globals,
12
+ GlobalTypes extends Globals | false,
13
13
  Processor extends object,
14
14
  Language extends object,
15
- > =
16
- & {
17
- languageOptions: LanguageOptions<ParserOptions, GlobalTypes>;
18
- }
19
- & (Interface<Processor> extends never ? object : Interface<Processor> extends { processor: string } ? Interface<Processor> : object)
20
- & (Interface<Language> extends never ? object : Interface<Language> extends { language: string } ? Interface<Language> : object);
15
+ > = (
16
+ { languageOptions: LanguageOptions<ParserOptions, GlobalTypes> }
17
+ & (
18
+ Processor extends never
19
+ ? object
20
+ : Processor extends { processor: infer P }
21
+ ? string extends P
22
+ ? object
23
+ : { processor: P }
24
+ : object
25
+ )
26
+ & (
27
+ Language extends never
28
+ ? object
29
+ : Language extends { language: infer L }
30
+ ? string extends L
31
+ ? object
32
+ : { language: L }
33
+ : object
34
+ )
35
+ );
@@ -1,16 +1,21 @@
1
+ import type { Globals } from "./globals";
2
+
1
3
  export type LanguageOptions<
2
4
  ParserOptions extends object | boolean,
3
- GlobalTypes extends string,
5
+ GlobalTypes extends Globals | false,
4
6
  > =
5
- & (literalful<GlobalTypes> extends never ? object : { globals: Record<string, unknown> })
6
- & (
7
- ParserOptions extends boolean
8
- ? Truth<ParserOptions> extends never
9
- ? object
10
- : { parser: unknown }
11
- : ParserOptions extends object
12
- ? Interface<ParserOptions> extends never
13
- ? object
14
- : { parser: unknown; parserOptions: ParserOptions }
15
- : object
16
- );
7
+ & (GlobalTypes extends never
8
+ ? object
9
+ : GlobalTypes extends false
10
+ ? object
11
+ : { globals: Record<string, unknown> }
12
+ )
13
+ & (
14
+ ParserOptions extends never
15
+ ? object
16
+ : ParserOptions extends boolean
17
+ ? ParserOptions extends true
18
+ ? { parser: unknown }
19
+ : object
20
+ : { parser: unknown; parserOptions: ParserOptions }
21
+ );
@@ -8,7 +8,7 @@ export default class Svelte extends Option<
8
8
  extraFileExtensions: readonly [".svelte"];
9
9
  } & Ts["option"]["languageOptions"]["parserOptions"],
10
10
  2,
11
- never,
11
+ false,
12
12
  { processor: "svelte/svelte" }
13
13
  > {
14
14
  public readonly scope = "svelte";
package/src/index.ts CHANGED
@@ -21,21 +21,28 @@ export type {
21
21
 
22
22
  import { scopes } from "./scopes";
23
23
  import {
24
+ Global,
24
25
  Factory,
25
26
  Options,
26
27
  } from "./factory";
27
28
 
28
- export default function (input: Input): Output {
29
+ export default function (
30
+ {
31
+ plugins,
32
+ parsers,
33
+ settings,
34
+ globals,
35
+ files,
36
+ ignores,
37
+ rules,
38
+ }: Input,
39
+ ): Output {
29
40
  try {
30
- const {
41
+ const global = new Global(
31
42
  plugins,
32
- parsers,
33
43
  settings,
34
44
  globals,
35
- files,
36
- ignores,
37
- rules,
38
- } = input,
45
+ ),
39
46
  factory = new Factory(
40
47
  files,
41
48
  ignores,
@@ -85,29 +92,7 @@ export default function (input: Input): Output {
85
92
  };
86
93
 
87
94
  return [
88
- {
89
- name: "linted/global/settings",
90
- plugins,
91
- linterOptions: {
92
- noInlineConfig: settings.noInlineConfig,
93
- reportUnusedDisableDirectives: settings.reportUnusedDisableDirectives,
94
- },
95
- languageOptions: {
96
- sourceType: settings.sourceType,
97
- ecmaVersion: settings.ecmaVersion,
98
- },
99
- },
100
- {
101
- name: "linted/global/ignores",
102
- ignores: typeof globals.extend.ignores === "undefined" || globals.extend.ignores.length < 1
103
- ? globals.ignores.ignores
104
- : [
105
- ...globals.extend.inherit === false
106
- ? []
107
- : globals.ignores.ignores,
108
- ...globals.extend.ignores,
109
- ],
110
- },
95
+ ...global.configs,
111
96
  ...scopes.flatMap(scope => options[scope]),
112
97
  ];
113
98
  }
@@ -32,17 +32,16 @@ export type GlobalConfigSystem = Partial<Record<
32
32
  | "latest"
33
33
  | 3
34
34
  | 5
35
- | ToNumber<`20${(
36
- | 15
37
- | 16
38
- | 17
39
- | 18
40
- | 19
41
- | 20
42
- | 21
43
- | 22
44
- | 23
45
- | 24
46
- )}`>;
35
+ | 2015
36
+ | 2016
37
+ | 2017
38
+ | 2018
39
+ | 2019
40
+ | 2020
41
+ | 2021
42
+ | 2022
43
+ | 2023
44
+ | 2024
45
+ ;
47
46
  };
48
47
  };
@@ -5,11 +5,7 @@ export interface ScopedConfig {
5
5
  rules: RuleRecord;
6
6
  files: string[];
7
7
  ignores: string[];
8
- languageOptions: {
9
- parser?: unknown;
10
- parserOptions?: Table;
11
- globals?: Table<true>;
12
- };
8
+ languageOptions: object;
13
9
  processor?: string;
14
10
  language?: string;
15
11
  }
@@ -1,7 +1,8 @@
1
1
  import type { RuleState } from "./state";
2
2
 
3
3
  export type { RuleState };
4
- export type RuleRecord = Table<
4
+ export type RuleRecord = Record<
5
+ string,
5
6
  | RuleState
6
7
  | readonly [RuleState, ...unknown[]]
7
8
  >;
@@ -1,4 +0,0 @@
1
- declare type alpha =
2
- | lower
3
- | upper
4
- ;
@@ -1,12 +0,0 @@
1
- declare type digit =
2
- | "0"
3
- | "1"
4
- | "2"
5
- | "3"
6
- | "4"
7
- | "5"
8
- | "6"
9
- | "7"
10
- | "8"
11
- | "9"
12
- ;
@@ -1,13 +0,0 @@
1
- declare type base64char =
2
- | alpha
3
- | digit
4
- | "+"
5
- | "/"
6
- ;
7
-
8
- declare type base64pad = "=";
9
-
10
- declare type base64paddedchar =
11
- | base64char
12
- | base64pad
13
- ;
@@ -1,9 +0,0 @@
1
- declare type hexchar =
2
- | digit
3
- | "A"
4
- | "B"
5
- | "C"
6
- | "D"
7
- | "E"
8
- | "F"
9
- ;
@@ -1 +0,0 @@
1
- declare type lower = Lowercase<upper>;