@breadstone-infrastructure/token-linter 0.0.231

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 (196) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/LICENSE +21 -0
  3. package/README.md +72 -0
  4. package/cli/Cli.d.ts +10 -0
  5. package/cli/Cli.d.ts.map +1 -0
  6. package/cli/Cli.js +32 -0
  7. package/cli/Cli.js.map +1 -0
  8. package/cli/CliArgs.d.ts +2 -0
  9. package/cli/CliArgs.d.ts.map +1 -0
  10. package/cli/CliArgs.js +88 -0
  11. package/cli/CliArgs.js.map +1 -0
  12. package/cli/CliArgsConfig.d.ts +2 -0
  13. package/cli/CliArgsConfig.d.ts.map +1 -0
  14. package/cli/CliArgsConfig.js +12 -0
  15. package/cli/CliArgsConfig.js.map +1 -0
  16. package/cli/CliRun.d.ts +2 -0
  17. package/cli/CliRun.d.ts.map +1 -0
  18. package/cli/CliRun.js +34 -0
  19. package/cli/CliRun.js.map +1 -0
  20. package/cli/commands/LintCommand.d.ts +2 -0
  21. package/cli/commands/LintCommand.d.ts.map +1 -0
  22. package/cli/commands/LintCommand.js +66 -0
  23. package/cli/commands/LintCommand.js.map +1 -0
  24. package/cli/commands/LintCommandArgsConfig.d.ts +2 -0
  25. package/cli/commands/LintCommandArgsConfig.d.ts.map +1 -0
  26. package/cli/commands/LintCommandArgsConfig.js +46 -0
  27. package/cli/commands/LintCommandArgsConfig.js.map +1 -0
  28. package/cli/lint.d.ts +3 -0
  29. package/cli/lint.d.ts.map +1 -0
  30. package/cli/lint.js +55 -0
  31. package/cli/lint.js.map +1 -0
  32. package/config/TokenLinterConfigDiscovery.d.ts +16 -0
  33. package/config/TokenLinterConfigDiscovery.d.ts.map +1 -0
  34. package/config/TokenLinterConfigDiscovery.js +44 -0
  35. package/config/TokenLinterConfigDiscovery.js.map +1 -0
  36. package/config/defineConfig.d.ts +41 -0
  37. package/config/defineConfig.d.ts.map +1 -0
  38. package/config/defineConfig.js +37 -0
  39. package/config/defineConfig.js.map +1 -0
  40. package/core/interaction.d.ts +25 -0
  41. package/core/interaction.d.ts.map +1 -0
  42. package/core/interaction.js +45 -0
  43. package/core/interaction.js.map +1 -0
  44. package/core/loader.d.ts +21 -0
  45. package/core/loader.d.ts.map +1 -0
  46. package/core/loader.js +84 -0
  47. package/core/loader.js.map +1 -0
  48. package/core/rule-registry.d.ts +46 -0
  49. package/core/rule-registry.d.ts.map +1 -0
  50. package/core/rule-registry.js +73 -0
  51. package/core/rule-registry.js.map +1 -0
  52. package/core/rule.d.ts +46 -0
  53. package/core/rule.d.ts.map +1 -0
  54. package/core/rule.js +3 -0
  55. package/core/rule.js.map +1 -0
  56. package/core/runner.d.ts +23 -0
  57. package/core/runner.d.ts.map +1 -0
  58. package/core/runner.js +103 -0
  59. package/core/runner.js.map +1 -0
  60. package/index.d.ts +46 -0
  61. package/index.d.ts.map +1 -0
  62. package/index.js +47 -0
  63. package/index.js.map +1 -0
  64. package/models/lint-result.d.ts +14 -0
  65. package/models/lint-result.d.ts.map +1 -0
  66. package/models/lint-result.js +3 -0
  67. package/models/lint-result.js.map +1 -0
  68. package/models/rule-context.d.ts +18 -0
  69. package/models/rule-context.d.ts.map +1 -0
  70. package/models/rule-context.js +3 -0
  71. package/models/rule-context.js.map +1 -0
  72. package/models/rule-finding.d.ts +15 -0
  73. package/models/rule-finding.d.ts.map +1 -0
  74. package/models/rule-finding.js +3 -0
  75. package/models/rule-finding.js.map +1 -0
  76. package/models/rule-result.d.ts +11 -0
  77. package/models/rule-result.d.ts.map +1 -0
  78. package/models/rule-result.js +3 -0
  79. package/models/rule-result.js.map +1 -0
  80. package/models/rule-severity.d.ts +14 -0
  81. package/models/rule-severity.d.ts.map +1 -0
  82. package/models/rule-severity.js +10 -0
  83. package/models/rule-severity.js.map +1 -0
  84. package/models/token-entry.d.ts +11 -0
  85. package/models/token-entry.d.ts.map +1 -0
  86. package/models/token-entry.js +2 -0
  87. package/models/token-entry.js.map +1 -0
  88. package/models/token-linter-config.d.ts +30 -0
  89. package/models/token-linter-config.d.ts.map +1 -0
  90. package/models/token-linter-config.js +3 -0
  91. package/models/token-linter-config.js.map +1 -0
  92. package/orchestration/TokenLinterOrchestrator.d.ts +29 -0
  93. package/orchestration/TokenLinterOrchestrator.d.ts.map +1 -0
  94. package/orchestration/TokenLinterOrchestrator.js +98 -0
  95. package/orchestration/TokenLinterOrchestrator.js.map +1 -0
  96. package/package.json +20 -0
  97. package/presets/index.d.ts +2 -0
  98. package/presets/index.d.ts.map +1 -0
  99. package/presets/index.js +2 -0
  100. package/presets/index.js.map +1 -0
  101. package/presets/recommended.d.ts +23 -0
  102. package/presets/recommended.d.ts.map +1 -0
  103. package/presets/recommended.js +41 -0
  104. package/presets/recommended.js.map +1 -0
  105. package/reporters/console.reporter.d.ts +15 -0
  106. package/reporters/console.reporter.d.ts.map +1 -0
  107. package/reporters/console.reporter.js +75 -0
  108. package/reporters/console.reporter.js.map +1 -0
  109. package/reporters/json.reporter.d.ts +11 -0
  110. package/reporters/json.reporter.d.ts.map +1 -0
  111. package/reporters/json.reporter.js +37 -0
  112. package/reporters/json.reporter.js.map +1 -0
  113. package/reporters/reporter.d.ts +16 -0
  114. package/reporters/reporter.d.ts.map +1 -0
  115. package/reporters/reporter.js +3 -0
  116. package/reporters/reporter.js.map +1 -0
  117. package/reporters/summary.reporter.d.ts +12 -0
  118. package/reporters/summary.reporter.d.ts.map +1 -0
  119. package/reporters/summary.reporter.js +48 -0
  120. package/reporters/summary.reporter.js.map +1 -0
  121. package/rules/alphabetical-sort.rule.d.ts +19 -0
  122. package/rules/alphabetical-sort.rule.d.ts.map +1 -0
  123. package/rules/alphabetical-sort.rule.js +72 -0
  124. package/rules/alphabetical-sort.rule.js.map +1 -0
  125. package/rules/component-presence.rule.d.ts +29 -0
  126. package/rules/component-presence.rule.d.ts.map +1 -0
  127. package/rules/component-presence.rule.js +102 -0
  128. package/rules/component-presence.rule.js.map +1 -0
  129. package/rules/duplicate-value.rule.d.ts +17 -0
  130. package/rules/duplicate-value.rule.d.ts.map +1 -0
  131. package/rules/duplicate-value.rule.js +49 -0
  132. package/rules/duplicate-value.rule.js.map +1 -0
  133. package/rules/empty-json.rule.d.ts +52 -0
  134. package/rules/empty-json.rule.d.ts.map +1 -0
  135. package/rules/empty-json.rule.js +100 -0
  136. package/rules/empty-json.rule.js.map +1 -0
  137. package/rules/forbidden-key.rule.d.ts +57 -0
  138. package/rules/forbidden-key.rule.d.ts.map +1 -0
  139. package/rules/forbidden-key.rule.js +118 -0
  140. package/rules/forbidden-key.rule.js.map +1 -0
  141. package/rules/forbidden-value.rule.d.ts +53 -0
  142. package/rules/forbidden-value.rule.d.ts.map +1 -0
  143. package/rules/forbidden-value.rule.js +130 -0
  144. package/rules/forbidden-value.rule.js.map +1 -0
  145. package/rules/includes-consistency.rule.d.ts +30 -0
  146. package/rules/includes-consistency.rule.d.ts.map +1 -0
  147. package/rules/includes-consistency.rule.js +153 -0
  148. package/rules/includes-consistency.rule.js.map +1 -0
  149. package/rules/index.d.ts +7 -0
  150. package/rules/index.d.ts.map +1 -0
  151. package/rules/index.js +47 -0
  152. package/rules/index.js.map +1 -0
  153. package/rules/key-consistency.rule.d.ts +38 -0
  154. package/rules/key-consistency.rule.d.ts.map +1 -0
  155. package/rules/key-consistency.rule.js +161 -0
  156. package/rules/key-consistency.rule.js.map +1 -0
  157. package/rules/missing-includes.rule.d.ts +19 -0
  158. package/rules/missing-includes.rule.d.ts.map +1 -0
  159. package/rules/missing-includes.rule.js +51 -0
  160. package/rules/missing-includes.rule.js.map +1 -0
  161. package/rules/mixin-reference.rule.d.ts +28 -0
  162. package/rules/mixin-reference.rule.d.ts.map +1 -0
  163. package/rules/mixin-reference.rule.js +104 -0
  164. package/rules/mixin-reference.rule.js.map +1 -0
  165. package/rules/naming-convention.rule.d.ts +29 -0
  166. package/rules/naming-convention.rule.d.ts.map +1 -0
  167. package/rules/naming-convention.rule.js +112 -0
  168. package/rules/naming-convention.rule.js.map +1 -0
  169. package/rules/nested-depth.rule.d.ts +42 -0
  170. package/rules/nested-depth.rule.d.ts.map +1 -0
  171. package/rules/nested-depth.rule.js +72 -0
  172. package/rules/nested-depth.rule.js.map +1 -0
  173. package/rules/required-includes.rule.d.ts +60 -0
  174. package/rules/required-includes.rule.d.ts.map +1 -0
  175. package/rules/required-includes.rule.js +118 -0
  176. package/rules/required-includes.rule.js.map +1 -0
  177. package/rules/rule-options.d.ts +158 -0
  178. package/rules/rule-options.d.ts.map +1 -0
  179. package/rules/rule-options.js +89 -0
  180. package/rules/rule-options.js.map +1 -0
  181. package/rules/value-consistency.rule.d.ts +17 -0
  182. package/rules/value-consistency.rule.d.ts.map +1 -0
  183. package/rules/value-consistency.rule.js +69 -0
  184. package/rules/value-consistency.rule.js.map +1 -0
  185. package/rules/value-schema.rule.d.ts +18 -0
  186. package/rules/value-schema.rule.d.ts.map +1 -0
  187. package/rules/value-schema.rule.js +108 -0
  188. package/rules/value-schema.rule.js.map +1 -0
  189. package/rules/value-type.rule.d.ts +71 -0
  190. package/rules/value-type.rule.d.ts.map +1 -0
  191. package/rules/value-type.rule.js +176 -0
  192. package/rules/value-type.rule.js.map +1 -0
  193. package/utils.d.ts +55 -0
  194. package/utils.d.ts.map +1 -0
  195. package/utils.js +125 -0
  196. package/utils.js.map +1 -0
package/index.d.ts ADDED
@@ -0,0 +1,46 @@
1
+ export * from './models/lint-result.js';
2
+ export * from './models/rule-context.js';
3
+ export * from './models/rule-finding.js';
4
+ export * from './models/rule-result.js';
5
+ export * from './models/rule-severity.js';
6
+ export * from './models/token-entry.js';
7
+ export * from './models/token-linter-config.js';
8
+ export * from './utils.js';
9
+ export * from './core/interaction.js';
10
+ export * from './core/loader.js';
11
+ export * from './core/rule-registry.js';
12
+ export * from './core/rule.js';
13
+ export * from './core/runner.js';
14
+ export { AlphabeticalSortRule } from './rules/alphabetical-sort.rule.js';
15
+ export { ComponentPresenceRule } from './rules/component-presence.rule.js';
16
+ export { DuplicateValueRule } from './rules/duplicate-value.rule.js';
17
+ export { EmptyJsonRule, emptyJsonRuleOptions } from './rules/empty-json.rule.js';
18
+ export type { IEmptyJsonRuleOptions } from './rules/empty-json.rule.js';
19
+ export { ForbiddenKeyRule, forbiddenKeyRuleOptions } from './rules/forbidden-key.rule.js';
20
+ export type { IForbiddenKeyRuleOptions } from './rules/forbidden-key.rule.js';
21
+ export { ForbiddenValueRule, forbiddenValueRuleOptions } from './rules/forbidden-value.rule.js';
22
+ export type { IForbiddenValueRuleOptions } from './rules/forbidden-value.rule.js';
23
+ export { IncludesConsistencyRule } from './rules/includes-consistency.rule.js';
24
+ export { builtInRules } from './rules/index.js';
25
+ export { KeyConsistencyRule } from './rules/key-consistency.rule.js';
26
+ export { MissingIncludesRule } from './rules/missing-includes.rule.js';
27
+ export { MixinReferenceRule } from './rules/mixin-reference.rule.js';
28
+ export { NamingConventionRule } from './rules/naming-convention.rule.js';
29
+ export { NestedDepthRule, nestedDepthRuleOptions } from './rules/nested-depth.rule.js';
30
+ export type { INestedDepthRuleOptions } from './rules/nested-depth.rule.js';
31
+ export { RequiredIncludesRule, requiredIncludesRuleOptions } from './rules/required-includes.rule.js';
32
+ export type { IRequiredIncludesRuleOptions } from './rules/required-includes.rule.js';
33
+ export { ValueConsistencyRule } from './rules/value-consistency.rule.js';
34
+ export { ValueSchemaRule } from './rules/value-schema.rule.js';
35
+ export { ValueTypeRule, valueTypeRuleOptions } from './rules/value-type.rule.js';
36
+ export type { IValueTypeRuleOptions } from './rules/value-type.rule.js';
37
+ export { recommended } from './presets/index.js';
38
+ export { ConsoleReporter } from './reporters/console.reporter.js';
39
+ export { JsonReporter } from './reporters/json.reporter.js';
40
+ export * from './reporters/reporter.js';
41
+ export { SummaryReporter } from './reporters/summary.reporter.js';
42
+ export { defineConfig } from './config/defineConfig.js';
43
+ export type { ITokenLinterConfigInput } from './config/defineConfig.js';
44
+ export { TokenLinterConfigDiscovery } from './config/TokenLinterConfigDiscovery.js';
45
+ export { TokenLinterOrchestrator } from './orchestration/TokenLinterOrchestrator.js';
46
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAGhD,cAAc,YAAY,CAAC;AAG3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACjF,YAAY,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAC1F,YAAY,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAChG,YAAY,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACvF,YAAY,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AACtG,YAAY,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACjF,YAAY,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGxE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGlE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,YAAY,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AAGpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC"}
package/index.js ADDED
@@ -0,0 +1,47 @@
1
+ // Models
2
+ export * from './models/lint-result.js';
3
+ export * from './models/rule-context.js';
4
+ export * from './models/rule-finding.js';
5
+ export * from './models/rule-result.js';
6
+ export * from './models/rule-severity.js';
7
+ export * from './models/token-entry.js';
8
+ export * from './models/token-linter-config.js';
9
+ // Utils
10
+ export * from './utils.js';
11
+ // Core
12
+ export * from './core/interaction.js';
13
+ export * from './core/loader.js';
14
+ export * from './core/rule-registry.js';
15
+ export * from './core/rule.js';
16
+ export * from './core/runner.js';
17
+ // Rules
18
+ export { AlphabeticalSortRule } from './rules/alphabetical-sort.rule.js';
19
+ export { ComponentPresenceRule } from './rules/component-presence.rule.js';
20
+ export { DuplicateValueRule } from './rules/duplicate-value.rule.js';
21
+ export { EmptyJsonRule, emptyJsonRuleOptions } from './rules/empty-json.rule.js';
22
+ export { ForbiddenKeyRule, forbiddenKeyRuleOptions } from './rules/forbidden-key.rule.js';
23
+ export { ForbiddenValueRule, forbiddenValueRuleOptions } from './rules/forbidden-value.rule.js';
24
+ export { IncludesConsistencyRule } from './rules/includes-consistency.rule.js';
25
+ export { builtInRules } from './rules/index.js';
26
+ export { KeyConsistencyRule } from './rules/key-consistency.rule.js';
27
+ export { MissingIncludesRule } from './rules/missing-includes.rule.js';
28
+ export { MixinReferenceRule } from './rules/mixin-reference.rule.js';
29
+ export { NamingConventionRule } from './rules/naming-convention.rule.js';
30
+ export { NestedDepthRule, nestedDepthRuleOptions } from './rules/nested-depth.rule.js';
31
+ export { RequiredIncludesRule, requiredIncludesRuleOptions } from './rules/required-includes.rule.js';
32
+ export { ValueConsistencyRule } from './rules/value-consistency.rule.js';
33
+ export { ValueSchemaRule } from './rules/value-schema.rule.js';
34
+ export { ValueTypeRule, valueTypeRuleOptions } from './rules/value-type.rule.js';
35
+ // Presets
36
+ export { recommended } from './presets/index.js';
37
+ // Reporters
38
+ export { ConsoleReporter } from './reporters/console.reporter.js';
39
+ export { JsonReporter } from './reporters/json.reporter.js';
40
+ export * from './reporters/reporter.js';
41
+ export { SummaryReporter } from './reporters/summary.reporter.js';
42
+ // Config
43
+ export { defineConfig } from './config/defineConfig.js';
44
+ export { TokenLinterConfigDiscovery } from './config/TokenLinterConfigDiscovery.js';
45
+ // Orchestration
46
+ export { TokenLinterOrchestrator } from './orchestration/TokenLinterOrchestrator.js';
47
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAEhD,QAAQ;AACR,cAAc,YAAY,CAAC;AAE3B,OAAO;AACP,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AAEjC,QAAQ;AACR,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEjF,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAE1F,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAEhG,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEvF,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAEtG,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAGjF,UAAU;AACV,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,YAAY;AACZ,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,SAAS;AACT,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AAEpF,gBAAgB;AAChB,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { IRuleResult } from './rule-result.js';
2
+ /**
3
+ * @description Aggregated result of a complete lint run across all rules.
4
+ * @public
5
+ */
6
+ export interface ILintResult {
7
+ readonly results: ReadonlyArray<IRuleResult>;
8
+ readonly totalErrors: number;
9
+ readonly totalWarnings: number;
10
+ readonly totalInfos: number;
11
+ readonly totalFixes: number;
12
+ readonly duration: number;
13
+ }
14
+ //# sourceMappingURL=lint-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lint-result.d.ts","sourceRoot":"","sources":["../../src/models/lint-result.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIpD;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IAC7C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC7B"}
@@ -0,0 +1,3 @@
1
+ // #region Imports
2
+ export {};
3
+ //# sourceMappingURL=lint-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lint-result.js","sourceRoot":"","sources":["../../src/models/lint-result.ts"],"names":[],"mappings":"AAAA,kBAAkB"}
@@ -0,0 +1,18 @@
1
+ import type { ILogger } from '@breadstone-infrastructure/utilities';
2
+ import type { ITokenEntry } from './token-entry.js';
3
+ import type { ITokenLinterConfig } from './token-linter-config.js';
4
+ /**
5
+ * @description Immutable context passed to each rule during execution.
6
+ * @public
7
+ */
8
+ export interface IRuleContext {
9
+ readonly entries: ReadonlyArray<ITokenEntry>;
10
+ readonly themes: ReadonlyArray<string>;
11
+ readonly config: Readonly<ITokenLinterConfig>;
12
+ readonly logger: ILogger;
13
+ readonly fix: boolean;
14
+ readonly interactive: boolean;
15
+ readonly mixinNames: ReadonlyArray<string>;
16
+ readonly mixinKeys: ReadonlyMap<string, ReadonlyArray<string>>;
17
+ }
18
+ //# sourceMappingURL=rule-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-context.d.ts","sourceRoot":"","sources":["../../src/models/rule-context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAInE;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IAC7C,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAC9C,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;CAClE"}
@@ -0,0 +1,3 @@
1
+ // #region Imports
2
+ export {};
3
+ //# sourceMappingURL=rule-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-context.js","sourceRoot":"","sources":["../../src/models/rule-context.ts"],"names":[],"mappings":"AAAA,kBAAkB"}
@@ -0,0 +1,15 @@
1
+ import type { RuleSeverity } from './rule-severity.js';
2
+ /**
3
+ * @description Represents a single finding produced by a rule during linting.
4
+ * @public
5
+ */
6
+ export interface IRuleFinding {
7
+ readonly component: string;
8
+ readonly theme: string;
9
+ readonly key?: string;
10
+ readonly message: string;
11
+ readonly severity: RuleSeverity;
12
+ readonly filePath?: string;
13
+ readonly fixed: boolean;
14
+ }
15
+ //# sourceMappingURL=rule-finding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-finding.d.ts","sourceRoot":"","sources":["../../src/models/rule-finding.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvD;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CAC3B"}
@@ -0,0 +1,3 @@
1
+ // #region Imports
2
+ export {};
3
+ //# sourceMappingURL=rule-finding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-finding.js","sourceRoot":"","sources":["../../src/models/rule-finding.ts"],"names":[],"mappings":"AAAA,kBAAkB"}
@@ -0,0 +1,11 @@
1
+ import type { IRuleFinding } from './rule-finding.js';
2
+ /**
3
+ * @description Represents the output of a single rule execution.
4
+ * @public
5
+ */
6
+ export interface IRuleResult {
7
+ readonly ruleName: string;
8
+ readonly findings: ReadonlyArray<IRuleFinding>;
9
+ readonly duration: number;
10
+ }
11
+ //# sourceMappingURL=rule-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-result.d.ts","sourceRoot":"","sources":["../../src/models/rule-result.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC7B"}
@@ -0,0 +1,3 @@
1
+ // #region Imports
2
+ export {};
3
+ //# sourceMappingURL=rule-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-result.js","sourceRoot":"","sources":["../../src/models/rule-result.ts"],"names":[],"mappings":"AAAA,kBAAkB"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @description Represents the severity level of a rule finding.
3
+ * @public
4
+ */
5
+ export declare const RuleSeverity: {
6
+ readonly Error: "error";
7
+ readonly Warning: "warning";
8
+ readonly Info: "info";
9
+ };
10
+ /**
11
+ * @public
12
+ */
13
+ export type RuleSeverity = (typeof RuleSeverity)[keyof typeof RuleSeverity];
14
+ //# sourceMappingURL=rule-severity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-severity.d.ts","sourceRoot":"","sources":["../../src/models/rule-severity.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @description Represents the severity level of a rule finding.
3
+ * @public
4
+ */
5
+ export const RuleSeverity = {
6
+ Error: 'error',
7
+ Warning: 'warning',
8
+ Info: 'info',
9
+ };
10
+ //# sourceMappingURL=rule-severity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-severity.js","sourceRoot":"","sources":["../../src/models/rule-severity.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACN,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @description Represents a single theme component token entry loaded from a JSON file.
3
+ * @public
4
+ */
5
+ export interface ITokenEntry {
6
+ readonly theme: string;
7
+ readonly component: string;
8
+ readonly filePath: string;
9
+ content: Record<string, unknown>;
10
+ }
11
+ //# sourceMappingURL=token-entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-entry.d.ts","sourceRoot":"","sources":["../../src/models/token-entry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=token-entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-entry.js","sourceRoot":"","sources":["../../src/models/token-entry.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
1
+ import type { RuleSeverity } from './rule-severity.js';
2
+ /**
3
+ * @description Base constraint for rule option objects.
4
+ * @public
5
+ */
6
+ export interface IRuleOptionValues {
7
+ readonly [key: string]: unknown;
8
+ }
9
+ /**
10
+ * @description Shape returned by every rule-options factory function.
11
+ * Maps the rule name to its typed options object.
12
+ * @public
13
+ */
14
+ export type IRuleOptionsEntry = Readonly<Record<string, Readonly<IRuleOptionValues>>>;
15
+ /**
16
+ * @description Configuration for the token linter.
17
+ * @public
18
+ */
19
+ export interface ITokenLinterConfig {
20
+ readonly tokensDir: string;
21
+ readonly mixinsDir: string;
22
+ readonly themes: ReadonlyArray<string>;
23
+ readonly fix: boolean;
24
+ readonly interactive: boolean;
25
+ readonly verbose: boolean;
26
+ readonly reporter: 'console' | 'json' | 'summary';
27
+ readonly rules: Readonly<Record<string, RuleSeverity | 'off'>>;
28
+ readonly ruleOptions: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
29
+ }
30
+ //# sourceMappingURL=token-linter-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-linter-config.d.ts","sourceRoot":"","sources":["../../src/models/token-linter-config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAMvD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAEtF;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IAClD,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,KAAK,CAAC,CAAC,CAAC;IAC/D,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;CACrF"}
@@ -0,0 +1,3 @@
1
+ // #region Imports
2
+ export {};
3
+ //# sourceMappingURL=token-linter-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-linter-config.js","sourceRoot":"","sources":["../../src/models/token-linter-config.ts"],"names":[],"mappings":"AAAA,kBAAkB"}
@@ -0,0 +1,29 @@
1
+ import { type ILogger } from '@breadstone-infrastructure/utilities';
2
+ import type { ILintResult } from '../models/lint-result.js';
3
+ import type { ITokenLinterConfig } from '../models/token-linter-config.js';
4
+ /**
5
+ * @description Orchestrates the full token linting pipeline: config discovery, loading, execution, and reporting.
6
+ * @public
7
+ */
8
+ export declare class TokenLinterOrchestrator {
9
+ private readonly _discovery;
10
+ private readonly _logger;
11
+ constructor(logger?: ILogger);
12
+ /**
13
+ * @description Runs the token linter by discovering the config from the given root path.
14
+ */
15
+ executeFromConfig(rootPath: string): Promise<ILintResult>;
16
+ /**
17
+ * @description Discovers the config file and merges explicit overrides on top.
18
+ * This follows the Vite pattern: config file is primary, executor options override.
19
+ * Only non-undefined override values replace config file values.
20
+ */
21
+ executeWithOverrides(rootPath: string, overrides: Partial<ITokenLinterConfig>): Promise<ILintResult>;
22
+ /**
23
+ * @description Runs the token linter with an explicitly provided config.
24
+ */
25
+ execute(rootPath: string, config: ITokenLinterConfig): Promise<ILintResult>;
26
+ private createReporter;
27
+ private mergeConfig;
28
+ }
29
+ //# sourceMappingURL=TokenLinterOrchestrator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TokenLinterOrchestrator.d.ts","sourceRoot":"","sources":["../../src/orchestration/TokenLinterOrchestrator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAMnF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAS3E;;;GAGG;AACH,qBAAa,uBAAuB;IAIhC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA6B;IACxD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;gBAMf,MAAM,CAAC,EAAE,OAAO;IASnC;;OAEG;IACU,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAMtE;;;;OAIG;IACU,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IAOjH;;OAEG;IACU,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC;IA8BxF,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,WAAW;CAmBtB"}
@@ -0,0 +1,98 @@
1
+ // #region Imports
2
+ import { ConsoleLogger } from '@breadstone-infrastructure/utilities';
3
+ import * as path from 'path';
4
+ import { TokenLinterConfigDiscovery } from '../config/TokenLinterConfigDiscovery.js';
5
+ import { TokenLoader } from '../core/loader.js';
6
+ import { RuleRegistry } from '../core/rule-registry.js';
7
+ import { LintRunner } from '../core/runner.js';
8
+ import { ConsoleReporter } from '../reporters/console.reporter.js';
9
+ import { JsonReporter } from '../reporters/json.reporter.js';
10
+ import { SummaryReporter } from '../reporters/summary.reporter.js';
11
+ import { builtInRules } from '../rules/index.js';
12
+ // #endregion
13
+ /**
14
+ * @description Orchestrates the full token linting pipeline: config discovery, loading, execution, and reporting.
15
+ * @public
16
+ */
17
+ export class TokenLinterOrchestrator {
18
+ // #region Fields
19
+ _discovery;
20
+ _logger;
21
+ // #endregion
22
+ // #region Ctor
23
+ constructor(logger) {
24
+ this._discovery = new TokenLinterConfigDiscovery();
25
+ this._logger = logger ?? new ConsoleLogger();
26
+ }
27
+ // #endregion
28
+ // #region Methods
29
+ /**
30
+ * @description Runs the token linter by discovering the config from the given root path.
31
+ */
32
+ async executeFromConfig(rootPath) {
33
+ const config = await this._discovery.discover(rootPath);
34
+ return this.execute(rootPath, config);
35
+ }
36
+ /**
37
+ * @description Discovers the config file and merges explicit overrides on top.
38
+ * This follows the Vite pattern: config file is primary, executor options override.
39
+ * Only non-undefined override values replace config file values.
40
+ */
41
+ async executeWithOverrides(rootPath, overrides) {
42
+ const config = await this._discovery.discover(rootPath);
43
+ const merged = this.mergeConfig(config, overrides);
44
+ return this.execute(rootPath, merged);
45
+ }
46
+ /**
47
+ * @description Runs the token linter with an explicitly provided config.
48
+ */
49
+ async execute(rootPath, config) {
50
+ this._logger.info('Token Linter — Starting analysis...');
51
+ const tokensBasePath = path.resolve(rootPath, config.tokensDir);
52
+ const mixinsBasePath = path.resolve(rootPath, config.mixinsDir);
53
+ // Load data
54
+ const entries = TokenLoader.loadThemeComponents(tokensBasePath, config.themes, this._logger);
55
+ const mixinNames = TokenLoader.loadMixinNames(mixinsBasePath);
56
+ const mixinKeys = TokenLoader.loadMixinContent(mixinsBasePath);
57
+ this._logger.info(`Loaded ${entries.length} component entries across ${config.themes.length} themes.`);
58
+ this._logger.info(`Found ${mixinNames.length} mixins.`);
59
+ // Setup registry with built-in rules
60
+ const registry = new RuleRegistry();
61
+ registry.registerAll(builtInRules());
62
+ // Run
63
+ const result = await LintRunner.run(registry, config, entries, mixinNames, mixinKeys, this._logger);
64
+ // Report
65
+ const reporter = this.createReporter(config.reporter);
66
+ reporter.report(result);
67
+ return result;
68
+ }
69
+ createReporter(type) {
70
+ switch (type) {
71
+ case 'json':
72
+ return new JsonReporter();
73
+ case 'summary':
74
+ return new SummaryReporter();
75
+ case 'console':
76
+ default:
77
+ return new ConsoleReporter();
78
+ }
79
+ }
80
+ mergeConfig(base, overrides) {
81
+ return {
82
+ tokensDir: overrides.tokensDir ?? base.tokensDir,
83
+ mixinsDir: overrides.mixinsDir ?? base.mixinsDir,
84
+ themes: overrides.themes ?? base.themes,
85
+ fix: overrides.fix ?? base.fix,
86
+ interactive: overrides.interactive ?? base.interactive,
87
+ verbose: overrides.verbose ?? base.verbose,
88
+ reporter: overrides.reporter ?? base.reporter,
89
+ rules: Object.keys(overrides.rules ?? {}).length > 0
90
+ ? { ...base.rules, ...overrides.rules }
91
+ : base.rules,
92
+ ruleOptions: Object.keys(overrides.ruleOptions ?? {}).length > 0
93
+ ? { ...base.ruleOptions, ...overrides.ruleOptions }
94
+ : base.ruleOptions,
95
+ };
96
+ }
97
+ }
98
+ //# sourceMappingURL=TokenLinterOrchestrator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TokenLinterOrchestrator.js","sourceRoot":"","sources":["../../src/orchestration/TokenLinterOrchestrator.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAElB,OAAO,EAAE,aAAa,EAAgB,MAAM,sCAAsC,CAAC;AACnF,OAAO,KAAK,IAAI,MAAM,MAAM,C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N,CAAC;CAGJ"}
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@breadstone-infrastructure/token-linter",
3
+ "description": "A configurable, extensible linter for Style Dictionary token JSON files. Validates structure, consistency, naming, and values across themes.",
4
+ "version": "0.0.231",
5
+ "license": "MIT",
6
+ "author": "andre.wehlert <awehlert@breadstone.de> (https://www.breadstone.de)",
7
+ "repository": {
8
+ "url": "git+ssh://git@github.com/RueDeRennes/mosaik.git"
9
+ },
10
+ "type": "module",
11
+ "main": "./index.js",
12
+ "types": "./index.d.ts",
13
+ "bin": "./bin/token-linter.js",
14
+ "dependencies": {
15
+ "@breadstone-infrastructure/utilities": "0.0.231",
16
+ "enquirer": "^2.4.1",
17
+ "glob": "13.0.6",
18
+ "tslib": "2.8.1"
19
+ }
20
+ }
@@ -0,0 +1,2 @@
1
+ export { recommended } from './recommended.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/presets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { recommended } from './recommended.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/presets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { RuleSeverity } from '../models/rule-severity.js';
2
+ /**
3
+ * @description Recommended preset with all built-in rules and sensible default severities.
4
+ * Spread this into your `rules` config to enable all rules, then override individual severities as needed.
5
+ *
6
+ * @example
7
+ * ```js
8
+ * import { defineConfig, recommended } from '@breadstone-infrastructure/token-linter';
9
+ *
10
+ * export default defineConfig({
11
+ * tokensDir: 'tokens/themes',
12
+ * themes: ['joy'],
13
+ * rules: {
14
+ * ...recommended,
15
+ * 'alphabetical-sort': 'off', // disable a specific rule
16
+ * },
17
+ * });
18
+ * ```
19
+ *
20
+ * @public
21
+ */
22
+ export declare const recommended: Readonly<Record<string, RuleSeverity>>;
23
+ //# sourceMappingURL=recommended.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recommended.d.ts","sourceRoot":"","sources":["../../src/presets/recommended.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAI/D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAiB9D,CAAC"}
@@ -0,0 +1,41 @@
1
+ // #region Imports
2
+ // #endregion
3
+ /**
4
+ * @description Recommended preset with all built-in rules and sensible default severities.
5
+ * Spread this into your `rules` config to enable all rules, then override individual severities as needed.
6
+ *
7
+ * @example
8
+ * ```js
9
+ * import { defineConfig, recommended } from '@breadstone-infrastructure/token-linter';
10
+ *
11
+ * export default defineConfig({
12
+ * tokensDir: 'tokens/themes',
13
+ * themes: ['joy'],
14
+ * rules: {
15
+ * ...recommended,
16
+ * 'alphabetical-sort': 'off', // disable a specific rule
17
+ * },
18
+ * });
19
+ * ```
20
+ *
21
+ * @public
22
+ */
23
+ export const recommended = {
24
+ 'component-presence': 'error',
25
+ 'key-consistency': 'error',
26
+ 'includes-consistency': 'warning',
27
+ 'missing-includes': 'warning',
28
+ 'required-includes': 'error',
29
+ 'empty-json': 'warning',
30
+ 'forbidden-value': 'warning',
31
+ 'forbidden-key': 'warning',
32
+ 'naming-convention': 'warning',
33
+ 'value-schema': 'info',
34
+ 'value-type': 'error',
35
+ 'value-consistency': 'info',
36
+ 'duplicate-value': 'info',
37
+ 'nested-depth': 'warning',
38
+ 'mixin-reference': 'error',
39
+ 'alphabetical-sort': 'warning',
40
+ };
41
+ //# sourceMappingURL=recommended.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recommended.js","sourceRoot":"","sources":["../../src/presets/recommended.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAIlB,aAAa;AAEb;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,WAAW,GAA2C;IAC/D,oBAAoB,EAAE,OAAO;IAC7B,iBAAiB,EAAE,OAAO;IAC1B,sBAAsB,EAAE,SAAS;IACjC,kBAAkB,EAAE,SAAS;IAC7B,mBAAmB,EAAE,OAAO;IAC5B,YAAY,EAAE,SAAS;IACvB,iBAAiB,EAAE,SAAS;IAC5B,eAAe,EAAE,SAAS;IAC1B,mBAAmB,EAAE,SAAS;IAC9B,cAAc,EAAE,MAAM;IACtB,YAAY,EAAE,OAAO;IACrB,mBAAmB,EAAE,MAAM;IAC3B,iBAAiB,EAAE,MAAM;IACzB,cAAc,EAAE,SAAS;IACzB,iBAAiB,EAAE,OAAO;IAC1B,mBAAmB,EAAE,SAAS;CACjC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { ILintResult } from '../models/lint-result.js';
2
+ import type { IReporter } from './reporter.js';
3
+ /**
4
+ * @description Outputs lint results as formatted console output with severity colors.
5
+ * @public
6
+ */
7
+ export declare class ConsoleReporter implements IReporter {
8
+ readonly name = "console";
9
+ private readonly _logger;
10
+ report(result: ILintResult): void;
11
+ private reportRule;
12
+ private reportSummary;
13
+ private formatSeverity;
14
+ }
15
+ //# sourceMappingURL=console.reporter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"console.reporter.d.ts","sourceRoot":"","sources":["../../src/reporters/console.reporter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI/C;;;GAGG;AACH,qBAAa,eAAgB,YAAW,SAAS;IAI7C,SAAgB,IAAI,aAAa;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuB;IAMxC,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAUxC,OAAO,CAAC,UAAU;IAqBlB,OAAO,CAAC,aAAa;IAgCrB,OAAO,CAAC,cAAc;CAczB"}