@webpieces/code-rules 0.4.843 → 0.4.845

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 (139) hide show
  1. package/package.json +12 -4
  2. package/src/api-lib-source-rule.d.ts +4 -1
  3. package/src/api-lib-source-rule.js.map +1 -1
  4. package/src/code-rules-bootstrap.js +8 -7
  5. package/src/code-rules-bootstrap.js.map +1 -1
  6. package/src/code-rules-config-table.d.ts +9 -10
  7. package/src/code-rules-config-table.js +48 -33
  8. package/src/code-rules-config-table.js.map +1 -1
  9. package/src/code-rules-engine.js.map +1 -1
  10. package/src/code-validator.d.ts +2 -1
  11. package/src/code-validator.js.map +1 -1
  12. package/src/configs/api-lib-spelling-configs.d.ts +40 -0
  13. package/src/configs/api-lib-spelling-configs.js +52 -0
  14. package/src/configs/api-lib-spelling-configs.js.map +1 -0
  15. package/src/configs/no-client-creation-config.d.ts +12 -0
  16. package/src/configs/no-client-creation-config.js +40 -0
  17. package/src/configs/no-client-creation-config.js.map +1 -0
  18. package/src/configs/no-state-paths-config.d.ts +41 -0
  19. package/src/configs/no-state-paths-config.js +51 -0
  20. package/src/configs/no-state-paths-config.js.map +1 -0
  21. package/src/configs/no-utility-types-config.d.ts +30 -0
  22. package/src/configs/no-utility-types-config.js +39 -0
  23. package/src/configs/no-utility-types-config.js.map +1 -0
  24. package/src/configs/required-type-suffix-config.d.ts +49 -0
  25. package/src/configs/required-type-suffix-config.js +62 -0
  26. package/src/configs/required-type-suffix-config.js.map +1 -0
  27. package/src/configs/rule-configs.d.ts +131 -0
  28. package/src/configs/rule-configs.js +309 -0
  29. package/src/configs/rule-configs.js.map +1 -0
  30. package/src/configs/tag-truth-configs.d.ts +66 -0
  31. package/src/configs/tag-truth-configs.js +82 -0
  32. package/src/configs/tag-truth-configs.js.map +1 -0
  33. package/src/index.d.ts +10 -0
  34. package/src/index.js +50 -1
  35. package/src/index.js.map +1 -1
  36. package/src/project-scan-targets.d.ts +2 -1
  37. package/src/project-scan-targets.js.map +1 -1
  38. package/src/rule-pack.d.ts +3 -0
  39. package/src/rule-pack.js +10 -0
  40. package/src/rule-pack.js.map +1 -0
  41. package/src/rule-settings.d.ts +5 -0
  42. package/src/rule-settings.js +269 -0
  43. package/src/rule-settings.js.map +1 -0
  44. package/src/scan-scope.d.ts +2 -1
  45. package/src/scan-scope.js.map +1 -1
  46. package/src/tag-rule.d.ts +1 -1
  47. package/src/tag-rule.js.map +1 -1
  48. package/src/validate-catch-error-pattern.d.ts +1 -1
  49. package/src/validate-catch-error-pattern.js +4 -3
  50. package/src/validate-catch-error-pattern.js.map +1 -1
  51. package/src/validate-dtos.d.ts +1 -1
  52. package/src/validate-dtos.js +2 -1
  53. package/src/validate-dtos.js.map +1 -1
  54. package/src/validate-ensure-we-are-secure.d.ts +2 -1
  55. package/src/validate-ensure-we-are-secure.js +3 -2
  56. package/src/validate-ensure-we-are-secure.js.map +1 -1
  57. package/src/validate-framework-packages.d.ts +2 -1
  58. package/src/validate-framework-packages.js +7 -6
  59. package/src/validate-framework-packages.js.map +1 -1
  60. package/src/validate-framework-tag.d.ts +1 -1
  61. package/src/validate-framework-tag.js +2 -2
  62. package/src/validate-framework-tag.js.map +1 -1
  63. package/src/validate-framework-tsconfig.d.ts +2 -1
  64. package/src/validate-framework-tsconfig.js +5 -4
  65. package/src/validate-framework-tsconfig.js.map +1 -1
  66. package/src/validate-inject-annotation-not-needed-for-concrete-class.d.ts +1 -1
  67. package/src/validate-inject-annotation-not-needed-for-concrete-class.js +3 -2
  68. package/src/validate-inject-annotation-not-needed-for-concrete-class.js.map +1 -1
  69. package/src/validate-match-rules.d.ts +1 -1
  70. package/src/validate-match-rules.js.map +1 -1
  71. package/src/validate-modified-files.d.ts +2 -1
  72. package/src/validate-modified-files.js +3 -2
  73. package/src/validate-modified-files.js.map +1 -1
  74. package/src/validate-modified-methods.d.ts +1 -1
  75. package/src/validate-modified-methods.js +4 -3
  76. package/src/validate-modified-methods.js.map +1 -1
  77. package/src/validate-new-methods.d.ts +1 -1
  78. package/src/validate-new-methods.js +1 -1
  79. package/src/validate-new-methods.js.map +1 -1
  80. package/src/validate-no-any-unknown.d.ts +1 -1
  81. package/src/validate-no-any-unknown.js +3 -2
  82. package/src/validate-no-any-unknown.js.map +1 -1
  83. package/src/validate-no-client-creation-outside-server-or-client.d.ts +1 -1
  84. package/src/validate-no-client-creation-outside-server-or-client.js +3 -2
  85. package/src/validate-no-client-creation-outside-server-or-client.js.map +1 -1
  86. package/src/validate-no-custom-css.d.ts +1 -1
  87. package/src/validate-no-custom-css.js +3 -2
  88. package/src/validate-no-custom-css.js.map +1 -1
  89. package/src/validate-no-destructure.d.ts +1 -1
  90. package/src/validate-no-destructure.js +3 -2
  91. package/src/validate-no-destructure.js.map +1 -1
  92. package/src/validate-no-direct-api-resolver.d.ts +1 -1
  93. package/src/validate-no-direct-api-resolver.js +3 -2
  94. package/src/validate-no-direct-api-resolver.js.map +1 -1
  95. package/src/validate-no-function-outside-class.d.ts +1 -1
  96. package/src/validate-no-function-outside-class.js +4 -3
  97. package/src/validate-no-function-outside-class.js.map +1 -1
  98. package/src/validate-no-implicit-any.d.ts +1 -1
  99. package/src/validate-no-implicit-any.js +3 -2
  100. package/src/validate-no-implicit-any.js.map +1 -1
  101. package/src/validate-no-inline-import-in-api-lib.d.ts +2 -1
  102. package/src/validate-no-inline-import-in-api-lib.js +3 -2
  103. package/src/validate-no-inline-import-in-api-lib.js.map +1 -1
  104. package/src/validate-no-inline-types.d.ts +1 -1
  105. package/src/validate-no-inline-types.js +3 -2
  106. package/src/validate-no-inline-types.js.map +1 -1
  107. package/src/validate-no-process-exit-outside-main.d.ts +1 -1
  108. package/src/validate-no-process-exit-outside-main.js +3 -2
  109. package/src/validate-no-process-exit-outside-main.js.map +1 -1
  110. package/src/validate-no-state-paths-in-templates.d.ts +1 -1
  111. package/src/validate-no-state-paths-in-templates.js +7 -6
  112. package/src/validate-no-state-paths-in-templates.js.map +1 -1
  113. package/src/validate-no-symbol-di-tokens.d.ts +1 -1
  114. package/src/validate-no-symbol-di-tokens.js +3 -2
  115. package/src/validate-no-symbol-di-tokens.js.map +1 -1
  116. package/src/validate-no-unmanaged-exceptions.d.ts +1 -1
  117. package/src/validate-no-unmanaged-exceptions.js +3 -2
  118. package/src/validate-no-unmanaged-exceptions.js.map +1 -1
  119. package/src/validate-no-utility-types-in-api-lib.d.ts +2 -1
  120. package/src/validate-no-utility-types-in-api-lib.js +3 -2
  121. package/src/validate-no-utility-types-in-api-lib.js.map +1 -1
  122. package/src/validate-one-enum-spelling-in-api-lib.d.ts +2 -1
  123. package/src/validate-one-enum-spelling-in-api-lib.js +3 -2
  124. package/src/validate-one-enum-spelling-in-api-lib.js.map +1 -1
  125. package/src/validate-prisma-converters.d.ts +1 -1
  126. package/src/validate-prisma-converters.js +3 -2
  127. package/src/validate-prisma-converters.js.map +1 -1
  128. package/src/validate-required-type-suffix.d.ts +2 -1
  129. package/src/validate-required-type-suffix.js +3 -2
  130. package/src/validate-required-type-suffix.js.map +1 -1
  131. package/src/validate-return-types.d.ts +1 -1
  132. package/src/validate-return-types.js +3 -2
  133. package/src/validate-return-types.js.map +1 -1
  134. package/src/validate-role-tag.d.ts +1 -1
  135. package/src/validate-role-tag.js +2 -2
  136. package/src/validate-role-tag.js.map +1 -1
  137. package/src/wp-ci.d.ts +0 -19
  138. package/src/wp-ci.js +4 -4
  139. package/src/wp-ci.js.map +1 -1
@@ -0,0 +1,309 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EnsureWeAreSecureConfig = exports.RoleTagConfig = exports.FrameworkTagConfig = exports.InjectAnnotationNotNeededForConcreteClassConfig = exports.NoFunctionOutsideClassConfig = exports.NoProcessExitOutsideMainConfig = exports.NoSymbolDiTokensConfig = exports.NoCustomCssConfig = exports.AngularNoDirectApiInResolverConfig = exports.CatchErrorPatternConfig = exports.NoUnmanagedExceptionsConfig = exports.NoDestructureConfig = exports.PrismaConverterConfig = exports.PrismaValidateDtosConfig = exports.NoImplicitAnyConfig = exports.NoAnyUnknownConfig = exports.NoInlineTypeLiteralsConfig = exports.RequireReturnTypeConfig = exports.MaxFileLinesConfig = exports.MaxMethodLinesConfig = exports.DIRECT_API_RESOLVER_MODES = exports.PRISMA_CONVERTER_MODES = exports.PRISMA_DTOS_MODES = exports.PROJECT_MODES = exports.INLINE_TYPE_MODES = exports.RETURN_TYPE_MODES = exports.METHOD_LIMIT_MODES = void 0;
4
+ const rules_sdk_1 = require("@webpieces/rules-sdk");
5
+ const rules_sdk_2 = require("@webpieces/rules-sdk");
6
+ const rules_sdk_3 = require("@webpieces/rules-sdk");
7
+ // Mode const arrays — TypeScript union types derived from them, and FieldDef enum
8
+ // values reference the same array. Impossible for the type and runtime check to diverge.
9
+ // Single source of truth for rule "mode" values. Exported so code-rules (and any other
10
+ // consumer) imports these instead of re-declaring the same unions — a rename here ripples
11
+ // everywhere at compile time. The FieldDef SCHEMA below references the same arrays, so the
12
+ // type and the runtime validation can never diverge.
13
+ exports.METHOD_LIMIT_MODES = ['OFF', 'NEW_METHODS', 'NEW_AND_MODIFIED_METHODS', 'NEW_AND_MODIFIED_FILES'];
14
+ exports.RETURN_TYPE_MODES = ['OFF', 'NEW_METHODS', 'NEW_AND_MODIFIED_METHODS', 'NEW_AND_MODIFIED_FILES'];
15
+ exports.INLINE_TYPE_MODES = ['OFF', 'NEW_METHODS', 'NEW_AND_MODIFIED_METHODS', 'NEW_AND_MODIFIED_FILES'];
16
+ // PROJECT-level rules (e.g. framework-tag): the check is neither line- nor file-scoped — it runs
17
+ // for a whole project when ANY file the project owns is touched. `MODIFIED_PROJECTS` names that
18
+ // honestly (nx `affected` already narrows execution to the changed projects).
19
+ exports.PROJECT_MODES = ['OFF', 'MODIFIED_PROJECTS'];
20
+ exports.PRISMA_DTOS_MODES = ['OFF', 'MODIFIED_CLASS', 'NEW_AND_MODIFIED_FILES'];
21
+ exports.PRISMA_CONVERTER_MODES = ['OFF', 'NEW_AND_MODIFIED_METHODS', 'NEW_AND_MODIFIED_FILES'];
22
+ exports.DIRECT_API_RESOLVER_MODES = ['OFF', 'NEW_AND_MODIFIED_CODE', 'NEW_AND_MODIFIED_METHODS', 'NEW_AND_MODIFIED_FILES'];
23
+ // ---------------------------------------------------------------------------
24
+ // Universal escape hatches — EVERY rule supports temporarily disabling itself
25
+ // either while on a named git branch (turnOffRuleWhileOnBranch) or until an
26
+ // epoch passes (turnOffRuleUntilEpoch). They live on a shared base class so the
27
+ // fields (and their schema entries) are declared once instead of repeated per
28
+ // rule. `mode` stays per-rule because its allowed values vary (ON/OFF vs
29
+ // NEW_AND_MODIFIED_CODE vs NEW_AND_MODIFIED_METHODS, etc).
30
+ //
31
+ // BOTH fields are REQUIRED on every rule so both hatches are ALWAYS VISIBLE in the config — an AI
32
+ // editing webpieces.config.json sees them on every rule and cannot miss that a rule can be time-boxed
33
+ // or branch-scoped off. Convention:
34
+ // turnOffRuleUntilEpoch: 0 = rule active (epoch in the past); a future unix epoch IN SECONDS =
35
+ // temporarily disabled until that moment.
36
+ // turnOffRuleWhileOnBranch: null = always on; a branch name = disabled while that branch is checked out.
37
+ // The name is matched EXACTLY (===). Globs/wildcards are NOT supported and
38
+ // must not be added: a pattern would switch a rule off on branches nobody
39
+ // enumerated. It is also ignored (loudly — shouldSkipRule throws) on a pull
40
+ // request from a FORK, where the branch name is the contributor's to choose.
41
+ // Required-but-nullable so its "unset" state is present-and-visible (null)
42
+ // rather than omitted.
43
+ // The earlier spellings of these two fields were RENAMED to the names above and are no longer accepted —
44
+ // the validator rejects them with a "renamed to X" hint. RENAMED_FIELD_ALIASES in validate-config.ts is
45
+ // the ONE place in src/ a dead spelling may still be written (see escape-hatch-key-spelling.spec.ts).
46
+ // ---------------------------------------------------------------------------
47
+ class MaxMethodLinesConfig extends rules_sdk_2.BaseRuleConfig {
48
+ limit;
49
+ disableAllowed;
50
+ static SCHEMA = {
51
+ mode: new rules_sdk_3.FieldDef('string', exports.METHOD_LIMIT_MODES),
52
+ limit: rules_sdk_3.FieldDef.optional('number'),
53
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
54
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
55
+ };
56
+ }
57
+ exports.MaxMethodLinesConfig = MaxMethodLinesConfig;
58
+ // max-file-lines — caps a file's line count.
59
+ //
60
+ // `allowedPaths` exempts whole file trees, matched with the shared `isPathExcluded` glob/prefix/segment
61
+ // semantics (the same field, same matcher and same meaning as no-function-outside-class / no-js-files /
62
+ // no-destructure). It is for files the repo did NOT author and cannot shrink — never a standing amnesty
63
+ // for hand-written code, which is what the inline disable and a refactor are for.
64
+ //
65
+ // The machine-generated trees in GENERATED_CODE_PATHS are exempt WITHOUT configuration, and
66
+ // `allowedPaths` ADDS to that floor rather than replacing it — see generated-code-paths.ts for why a
67
+ // 42,000-line graphql-codegen output must not be able to cost a repo the whole rule.
68
+ class MaxFileLinesConfig extends rules_sdk_2.BaseRuleConfig {
69
+ limit;
70
+ disableAllowed;
71
+ allowedPaths;
72
+ static SCHEMA = {
73
+ mode: new rules_sdk_3.FieldDef('string', rules_sdk_1.FILE_LIMIT_MODES),
74
+ limit: rules_sdk_3.FieldDef.optional('number'),
75
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
76
+ allowedPaths: rules_sdk_3.FieldDef.optional('string[]'),
77
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
78
+ };
79
+ }
80
+ exports.MaxFileLinesConfig = MaxFileLinesConfig;
81
+ class RequireReturnTypeConfig extends rules_sdk_2.BaseRuleConfig {
82
+ disableAllowed;
83
+ static SCHEMA = {
84
+ mode: new rules_sdk_3.FieldDef('string', exports.RETURN_TYPE_MODES),
85
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
86
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
87
+ };
88
+ }
89
+ exports.RequireReturnTypeConfig = RequireReturnTypeConfig;
90
+ class NoInlineTypeLiteralsConfig extends rules_sdk_2.BaseRuleConfig {
91
+ disableAllowed;
92
+ static SCHEMA = {
93
+ mode: new rules_sdk_3.FieldDef('string', exports.INLINE_TYPE_MODES),
94
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
95
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
96
+ };
97
+ }
98
+ exports.NoInlineTypeLiteralsConfig = NoInlineTypeLiteralsConfig;
99
+ class NoAnyUnknownConfig extends rules_sdk_2.BaseRuleConfig {
100
+ disableAllowed;
101
+ static SCHEMA = {
102
+ mode: new rules_sdk_3.FieldDef('string', rules_sdk_1.MODIFIED_CODE_MODES),
103
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
104
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
105
+ };
106
+ }
107
+ exports.NoAnyUnknownConfig = NoAnyUnknownConfig;
108
+ class NoImplicitAnyConfig extends rules_sdk_2.BaseRuleConfig {
109
+ disableAllowed;
110
+ static SCHEMA = {
111
+ mode: new rules_sdk_3.FieldDef('string', rules_sdk_1.MODIFIED_CODE_MODES),
112
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
113
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
114
+ };
115
+ }
116
+ exports.NoImplicitAnyConfig = NoImplicitAnyConfig;
117
+ class PrismaValidateDtosConfig extends rules_sdk_2.BaseRuleConfig {
118
+ disableAllowed;
119
+ prismaSchemaPath;
120
+ dtoSourcePaths;
121
+ static SCHEMA = {
122
+ mode: new rules_sdk_3.FieldDef('string', exports.PRISMA_DTOS_MODES),
123
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
124
+ prismaSchemaPath: rules_sdk_3.FieldDef.optional('string'),
125
+ dtoSourcePaths: rules_sdk_3.FieldDef.optional('string[]'),
126
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
127
+ };
128
+ }
129
+ exports.PrismaValidateDtosConfig = PrismaValidateDtosConfig;
130
+ class PrismaConverterConfig extends rules_sdk_2.BaseRuleConfig {
131
+ disableAllowed;
132
+ schemaPath;
133
+ convertersPaths;
134
+ enforcePaths;
135
+ static SCHEMA = {
136
+ mode: new rules_sdk_3.FieldDef('string', exports.PRISMA_CONVERTER_MODES),
137
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
138
+ schemaPath: rules_sdk_3.FieldDef.optional('string'),
139
+ convertersPaths: rules_sdk_3.FieldDef.optional('string[]'),
140
+ enforcePaths: rules_sdk_3.FieldDef.optional('string[]'),
141
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
142
+ };
143
+ }
144
+ exports.PrismaConverterConfig = PrismaConverterConfig;
145
+ // `allowedPaths` exempts whole file trees whose idioms are destructuring by construction (React /
146
+ // React Native components and hooks — `const [x, setX] = useState()`, destructured props — framework
147
+ // glue), matched with the shared glob/prefix/segment semantics of `isPathExcluded`. It is the ONLY
148
+ // escape when `disableAllowed: false`, since that setting deliberately ignores inline disables.
149
+ class NoDestructureConfig extends rules_sdk_2.BaseRuleConfig {
150
+ allowTopLevel;
151
+ disableAllowed;
152
+ allowedPaths;
153
+ static SCHEMA = {
154
+ mode: new rules_sdk_3.FieldDef('string', rules_sdk_1.MODIFIED_CODE_MODES),
155
+ allowTopLevel: rules_sdk_3.FieldDef.optional('boolean'),
156
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
157
+ allowedPaths: rules_sdk_3.FieldDef.optional('string[]'),
158
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
159
+ };
160
+ }
161
+ exports.NoDestructureConfig = NoDestructureConfig;
162
+ class NoUnmanagedExceptionsConfig extends rules_sdk_2.BaseRuleConfig {
163
+ disableAllowed;
164
+ static SCHEMA = {
165
+ mode: new rules_sdk_3.FieldDef('string', rules_sdk_1.MODIFIED_CODE_MODES),
166
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
167
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
168
+ };
169
+ }
170
+ exports.NoUnmanagedExceptionsConfig = NoUnmanagedExceptionsConfig;
171
+ class CatchErrorPatternConfig extends rules_sdk_2.BaseRuleConfig {
172
+ disableAllowed;
173
+ static SCHEMA = {
174
+ mode: new rules_sdk_3.FieldDef('string', rules_sdk_1.MODIFIED_CODE_MODES),
175
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
176
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
177
+ };
178
+ }
179
+ exports.CatchErrorPatternConfig = CatchErrorPatternConfig;
180
+ class AngularNoDirectApiInResolverConfig extends rules_sdk_2.BaseRuleConfig {
181
+ disableAllowed;
182
+ enforcePaths;
183
+ static SCHEMA = {
184
+ mode: new rules_sdk_3.FieldDef('string', exports.DIRECT_API_RESOLVER_MODES),
185
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
186
+ enforcePaths: rules_sdk_3.FieldDef.optional('string[]'),
187
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
188
+ };
189
+ }
190
+ exports.AngularNoDirectApiInResolverConfig = AngularNoDirectApiInResolverConfig;
191
+ // Bans hand-written CSS in Angular sources (styles:/styleUrls:/styleUrl: in @Component, and inline
192
+ // style=/[style.x]/[ngStyle] in templates) so teams style with Tailwind utility classes. `allowGlobs`
193
+ // exempts paths WITHIN the Angular scope (e.g. a vendored Fuse kit copied verbatim with its own CSS).
194
+ class NoCustomCssConfig extends rules_sdk_2.BaseRuleConfig {
195
+ disableAllowed;
196
+ allowGlobs;
197
+ static SCHEMA = {
198
+ mode: new rules_sdk_3.FieldDef('string', rules_sdk_1.MODIFIED_CODE_MODES),
199
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
200
+ allowGlobs: rules_sdk_3.FieldDef.optional('string[]'),
201
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
202
+ };
203
+ }
204
+ exports.NoCustomCssConfig = NoCustomCssConfig;
205
+ class NoSymbolDiTokensConfig extends rules_sdk_2.BaseRuleConfig {
206
+ disableAllowed;
207
+ allowedPaths;
208
+ static SCHEMA = {
209
+ mode: new rules_sdk_3.FieldDef('string', rules_sdk_1.MODIFIED_CODE_MODES),
210
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
211
+ allowedPaths: rules_sdk_3.FieldDef.optional('string[]'),
212
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
213
+ };
214
+ }
215
+ exports.NoSymbolDiTokensConfig = NoSymbolDiTokensConfig;
216
+ // Flags `process.exit(...)` outside a main()/runMain wrapper (and `import { main }`) so a deep exit
217
+ // can't silently kill a reused server/command. Gradual-rollout knobs via the standard base: mode
218
+ // (OFF | NEW_AND_MODIFIED_CODE | NEW_AND_MODIFIED_FILES), turnOffRuleUntilEpoch, branch, and
219
+ // disableAllowed for the inline `// webpieces-disable` escape at genuine terminal boundaries.
220
+ class NoProcessExitOutsideMainConfig extends rules_sdk_2.BaseRuleConfig {
221
+ disableAllowed;
222
+ static SCHEMA = {
223
+ mode: new rules_sdk_3.FieldDef('string', rules_sdk_1.MODIFIED_CODE_MODES),
224
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
225
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
226
+ };
227
+ }
228
+ exports.NoProcessExitOutsideMainConfig = NoProcessExitOutsideMainConfig;
229
+ // Flags a function CREATED OUTSIDE A CLASS at module scope: a top-level `function foo()` declaration
230
+ // or a top-level `const foo = () => {}` / `= function(){}`. The point is that webpieces DI +
231
+ // @DocumentDesign only work when behavior lives in injectable classes — a module-scope function is a
232
+ // dead-end the DI graph can't reach. Inline callbacks, nested functions inside methods, and non-function
233
+ // top-level consts (objects, zod schemas, primitives) are NOT flagged. Standard rollout knobs via the
234
+ // base: mode (OFF | NEW_AND_MODIFIED_CODE | NEW_AND_MODIFIED_FILES), turnOffRuleUntilEpoch, branch,
235
+ // and disableAllowed for the inline `// webpieces-disable` escape. `allowedPaths` exempts whole file
236
+ // trees that legitimately live outside the class-per-behavior model (e.g. React component/hook files,
237
+ // framework glue), matched with the shared glob/prefix/segment semantics of `isPathExcluded`.
238
+ class NoFunctionOutsideClassConfig extends rules_sdk_2.BaseRuleConfig {
239
+ disableAllowed;
240
+ allowedPaths;
241
+ static SCHEMA = {
242
+ mode: new rules_sdk_3.FieldDef('string', rules_sdk_1.MODIFIED_CODE_MODES),
243
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
244
+ allowedPaths: rules_sdk_3.FieldDef.optional('string[]'),
245
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
246
+ };
247
+ }
248
+ exports.NoFunctionOutsideClassConfig = NoFunctionOutsideClassConfig;
249
+ // inject-annotation-not-needed-for-concrete-class — flags a REDUNDANT `@inject(X)` whose token is
250
+ // textually identical to the parameter's own declared type (`@inject(Foo) private readonly foo: Foo`).
251
+ // In this inversify setup the decorator is pure noise there: reflect-metadata (emitDecoratorMetadata)
252
+ // already resolves a constructor parameter by its class type, so `private readonly foo: Foo` binds on
253
+ // its own (see CLAUDE.md, and the no-symbol-di-tokens rule that pushes the same way). Symbol/interface
254
+ // tokens are NOT flagged because they never equal the type (`@inject(FOO_TOKEN) x: Provider<Foo>`).
255
+ // AI keeps carpet-bombing `@inject`; this fails the build on the redundant form. Standard rollout knobs
256
+ // via the base: mode (OFF | NEW_AND_MODIFIED_CODE | NEW_AND_MODIFIED_FILES), turnOffRuleUntilEpoch,
257
+ // branch, and disableAllowed for the inline `// webpieces-disable` escape. `allowedPaths` exempts whole
258
+ // file trees, matched with the shared glob/prefix/segment semantics.
259
+ class InjectAnnotationNotNeededForConcreteClassConfig extends rules_sdk_2.BaseRuleConfig {
260
+ disableAllowed;
261
+ allowedPaths;
262
+ static SCHEMA = {
263
+ mode: new rules_sdk_3.FieldDef('string', rules_sdk_1.MODIFIED_CODE_MODES),
264
+ disableAllowed: rules_sdk_3.FieldDef.optional('boolean'),
265
+ allowedPaths: rules_sdk_3.FieldDef.optional('string[]'),
266
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
267
+ };
268
+ }
269
+ exports.InjectAnnotationNotNeededForConcreteClassConfig = InjectAnnotationNotNeededForConcreteClassConfig;
270
+ // framework-tag — every project that a changed source file belongs to must carry >=1
271
+ // `framework:<browser|react|angular|node|express|react-native>` nx tag in its project.json. Those tags are the
272
+ // project's "libType" — the SET of runtime environments it runs in — and the source of truth for
273
+ // the dependencies.json `framework` field and the `library-types-match-client` rule. Multiple tags
274
+ // are allowed (the env set) and values are validated against the known set (`framework:all` is a
275
+ // hard error). `knownTypes` customizes that set (defaults to browser, react, angular, node, express,
276
+ // react-native — the last a first-class runtime, not a browser, #1064).
277
+ class FrameworkTagConfig extends rules_sdk_2.BaseRuleConfig {
278
+ knownTypes;
279
+ static SCHEMA = {
280
+ mode: new rules_sdk_3.FieldDef('string', exports.PROJECT_MODES),
281
+ knownTypes: rules_sdk_3.FieldDef.optional('string[]'),
282
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
283
+ };
284
+ }
285
+ exports.FrameworkTagConfig = FrameworkTagConfig;
286
+ // role-tag — every project that a changed source file belongs to must carry a
287
+ // `role:<server|app|bundle|designed-lib|lib|client|api-lib|api-client>` nx tag in its project.json. That tag is the project's
288
+ // ROLE (orthogonal to `framework` libType) — the source of truth for the dependencies.json `role`
289
+ // field, the `role-dependency` edge rule (apps are never depended upon), and DI-design generation
290
+ // (server→@Controller, designed-lib→@ApiImplementation, lib→none, client→angular design).
291
+ // `knownTypes` customizes the list suggested to the author when a tag is missing.
292
+ class RoleTagConfig extends rules_sdk_2.BaseRuleConfig {
293
+ knownTypes;
294
+ static SCHEMA = {
295
+ mode: new rules_sdk_3.FieldDef('string', exports.PROJECT_MODES),
296
+ knownTypes: rules_sdk_3.FieldDef.optional('string[]'),
297
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
298
+ };
299
+ }
300
+ exports.RoleTagConfig = RoleTagConfig;
301
+ // Touching a project audits every production API contract it directly owns.
302
+ class EnsureWeAreSecureConfig extends rules_sdk_2.BaseRuleConfig {
303
+ static SCHEMA = {
304
+ mode: new rules_sdk_3.FieldDef('string', exports.PROJECT_MODES),
305
+ ...rules_sdk_2.BASE_RULE_SCHEMA,
306
+ };
307
+ }
308
+ exports.EnsureWeAreSecureConfig = EnsureWeAreSecureConfig;
309
+ //# sourceMappingURL=rule-configs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-configs.js","sourceRoot":"","sources":["../../../../../../packages/tooling/code-rules/src/configs/rule-configs.ts"],"names":[],"mappings":";;;AAAA,oDAA8G;AAC9G,oDAAwE;AACxE,oDAA6D;AAC7D,kFAAkF;AAClF,yFAAyF;AAEzF,uFAAuF;AACvF,0FAA0F;AAC1F,2FAA2F;AAC3F,qDAAqD;AACxC,QAAA,kBAAkB,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,0BAA0B,EAAE,wBAAwB,CAAU,CAAC;AAI3G,QAAA,iBAAiB,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,0BAA0B,EAAE,wBAAwB,CAAU,CAAC;AAI1G,QAAA,iBAAiB,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,0BAA0B,EAAE,wBAAwB,CAAU,CAAC;AAIvH,iGAAiG;AACjG,gGAAgG;AAChG,8EAA8E;AACjE,QAAA,aAAa,GAAG,CAAC,KAAK,EAAE,mBAAmB,CAAU,CAAC;AAItD,QAAA,iBAAiB,GAAG,CAAC,KAAK,EAAE,gBAAgB,EAAE,wBAAwB,CAAU,CAAC;AAIjF,QAAA,sBAAsB,GAAG,CAAC,KAAK,EAAE,0BAA0B,EAAE,wBAAwB,CAAU,CAAC;AAIhG,QAAA,yBAAyB,GAAG,CAAC,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,wBAAwB,CAAU,CAAC;AAIzI,8EAA8E;AAC9E,8EAA8E;AAC9E,4EAA4E;AAC5E,gFAAgF;AAChF,8EAA8E;AAC9E,yEAAyE;AACzE,2DAA2D;AAC3D,EAAE;AACF,kGAAkG;AAClG,sGAAsG;AACtG,oCAAoC;AACpC,oGAAoG;AACpG,sEAAsE;AACtE,2GAA2G;AAC3G,uGA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AAQ,CAAC,UAAU,CAAC;QAC3C,GAAG,4BAAgB;KACtB,CAAC;;AAVN,0GAWC;AAED,qFAAqF;AACrF,+GAA+G;AAC/G,iGAAiG;AACjG,mGAAmG;AACnG,iGAAiG;AACjG,qGAAqG;AACrG,wEAAwE;AACxE,MAAa,kBAAmB,SAAQ,0BAAc;IAElD,UAAU,CAAY;IAEtB,MAAM,CAAU,MAAM,GAAoC;QACtD,IAAI,EAAE,IAAI,oBAAQ,CAAC,QAAQ,EAAE,qBAAa,CAAC;QAC3C,UAAU,EAAE,oBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;QACzC,GAAG,4BAAgB;KACtB,CAAC;;AARN,gDASC;AAED,8EAA8E;AAC9E,8HAA8H;AAC9H,kGAAkG;AAClG,kGAAkG;AAClG,0FAA0F;AAC1F,kFAAkF;AAClF,MAAa,aAAc,SAAQ,0BAAc;IAE7C,UAAU,CAAY;IAEtB,MAAM,CAAU,MAAM,GAA+B;QACjD,IAAI,EAAE,IAAI,oBAAQ,CAAC,QAAQ,EAAE,qBAAa,CAAC;QAC3C,UAAU,EAAE,oBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;QACzC,GAAG,4BAAgB;KACtB,CAAC;;AARN,sCASC;AAED,4EAA4E;AAC5E,MAAa,uBAAwB,SAAQ,0BAAc;IAEvD,MAAM,CAAU,MAAM,GAAyC;QAC3D,IAAI,EAAE,IAAI,oBAAQ,CAAC,QAAQ,EAAE,qBAAa,CAAC;QAC3C,GAAG,4BAAgB;KACtB,CAAC;;AALN,0DAMC","sourcesContent":["import { FileLimitMode, FILE_LIMIT_MODES, ModifiedCodeMode, MODIFIED_CODE_MODES } from \"@webpieces/rules-sdk\";\nimport { BaseRuleConfig, BASE_RULE_SCHEMA } from \"@webpieces/rules-sdk\";\nimport { FieldDef, SchemaShape } from \"@webpieces/rules-sdk\";\n// Mode const arrays — TypeScript union types derived from them, and FieldDef enum\n// values reference the same array. Impossible for the type and runtime check to diverge.\n\n// Single source of truth for rule \"mode\" values. Exported so code-rules (and any other\n// consumer) imports these instead of re-declaring the same unions — a rename here ripples\n// everywhere at compile time. The FieldDef SCHEMA below references the same arrays, so the\n// type and the runtime validation can never diverge.\nexport const METHOD_LIMIT_MODES = ['OFF', 'NEW_METHODS', 'NEW_AND_MODIFIED_METHODS', 'NEW_AND_MODIFIED_FILES'] as const;\n\nexport type MethodLimitMode = typeof METHOD_LIMIT_MODES[number];\n\nexport const RETURN_TYPE_MODES = ['OFF', 'NEW_METHODS', 'NEW_AND_MODIFIED_METHODS', 'NEW_AND_MODIFIED_FILES'] as const;\n\nexport type ReturnTypeMode = typeof RETURN_TYPE_MODES[number];\n\nexport const INLINE_TYPE_MODES = ['OFF', 'NEW_METHODS', 'NEW_AND_MODIFIED_METHODS', 'NEW_AND_MODIFIED_FILES'] as const;\n\nexport type InlineTypeMode = typeof INLINE_TYPE_MODES[number];\n\n// PROJECT-level rules (e.g. framework-tag): the check is neither line- nor file-scoped — it runs\n// for a whole project when ANY file the project owns is touched. `MODIFIED_PROJECTS` names that\n// honestly (nx `affected` already narrows execution to the changed projects).\nexport const PROJECT_MODES = ['OFF', 'MODIFIED_PROJECTS'] as const;\n\nexport type ProjectMode = typeof PROJECT_MODES[number];\n\nexport const PRISMA_DTOS_MODES = ['OFF', 'MODIFIED_CLASS', 'NEW_AND_MODIFIED_FILES'] as const;\n\nexport type PrismaValidateDtosMode = typeof PRISMA_DTOS_MODES[number];\n\nexport const PRISMA_CONVERTER_MODES = ['OFF', 'NEW_AND_MODIFIED_METHODS', 'NEW_AND_MODIFIED_FILES'] as const;\n\nexport type PrismaConverterMode = typeof PRISMA_CONVERTER_MODES[number];\n\nexport const DIRECT_API_RESOLVER_MODES = ['OFF', 'NEW_AND_MODIFIED_CODE', 'NEW_AND_MODIFIED_METHODS', 'NEW_AND_MODIFIED_FILES'] as const;\n\nexport type DirectApiResolverMode = typeof DIRECT_API_RESOLVER_MODES[number];\n\n// ---------------------------------------------------------------------------\n// Universal escape hatches — EVERY rule supports temporarily disabling itself\n// either while on a named git branch (turnOffRuleWhileOnBranch) or until an\n// epoch passes (turnOffRuleUntilEpoch). They live on a shared base class so the\n// fields (and their schema entries) are declared once instead of repeated per\n// rule. `mode` stays per-rule because its allowed values vary (ON/OFF vs\n// NEW_AND_MODIFIED_CODE vs NEW_AND_MODIFIED_METHODS, etc).\n//\n// BOTH fields are REQUIRED on every rule so both hatches are ALWAYS VISIBLE in the config — an AI\n// editing webpieces.config.json sees them on every rule and cannot miss that a rule can be time-boxed\n// or branch-scoped off. Convention:\n// turnOffRuleUntilEpoch: 0 = rule active (epoch in the past); a future unix epoch IN SECONDS =\n// temporarily disabled until that moment.\n// turnOffRuleWhileOnBranch: null = always on; a branch name = disabled while that branch is checked out.\n// The name is matched EXACTLY (===). Globs/wildcards are NOT supported and\n// must not be added: a pattern would switch a rule off on branches nobody\n// enumerated. It is also ignored (loudly — shouldSkipRule throws) on a pull\n// request from a FORK, where the branch name is the contributor's to choose.\n// Required-but-nullable so its \"unset\" state is present-and-visible (null)\n// rather than omitted.\n// The earlier spellings of these two fields were RENAMED to the names above and are no longer accepted —\n// the validator rejects them with a \"renamed to X\" hint. RENAMED_FIELD_ALIASES in validate-config.ts is\n// the ONE place in src/ a dead spelling may still be written (see escape-hatch-key-spelling.spec.ts).\n// ---------------------------------------------------------------------------\nexport class MaxMethodLinesConfig extends BaseRuleConfig {\n declare mode?: MethodLimitMode;\n limit?: number;\n disableAllowed?: boolean;\n\n static readonly SCHEMA: SchemaShape<MaxMethodLinesConfig> = {\n mode: new FieldDef('string', METHOD_LIMIT_MODES),\n limit: FieldDef.optional('number'),\n disableAllowed: FieldDef.optional('boolean'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n// max-file-lines — caps a file's line count.\n//\n// `allowedPaths` exempts whole file trees, matched with the shared `isPathExcluded` glob/prefix/segment\n// semantics (the same field, same matcher and same meaning as no-function-outside-class / no-js-files /\n// no-destructure). It is for files the repo did NOT author and cannot shrink — never a standing amnesty\n// for hand-written code, which is what the inline disable and a refactor are for.\n//\n// The machine-generated trees in GENERATED_CODE_PATHS are exempt WITHOUT configuration, and\n// `allowedPaths` ADDS to that floor rather than replacing it — see generated-code-paths.ts for why a\n// 42,000-line graphql-codegen output must not be able to cost a repo the whole rule.\nexport class MaxFileLinesConfig extends BaseRuleConfig {\n declare mode?: FileLimitMode;\n limit?: number;\n disableAllowed?: boolean;\n allowedPaths?: string[];\n\n static readonly SCHEMA: SchemaShape<MaxFileLinesConfig> = {\n mode: new FieldDef('string', FILE_LIMIT_MODES),\n limit: FieldDef.optional('number'),\n disableAllowed: FieldDef.optional('boolean'),\n allowedPaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\nexport class RequireReturnTypeConfig extends BaseRuleConfig {\n declare mode?: ReturnTypeMode;\n disableAllowed?: boolean;\n\n static readonly SCHEMA: SchemaShape<RequireReturnTypeConfig> = {\n mode: new FieldDef('string', RETURN_TYPE_MODES),\n disableAllowed: FieldDef.optional('boolean'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\nexport class NoInlineTypeLiteralsConfig extends BaseRuleConfig {\n declare mode?: InlineTypeMode;\n disableAllowed?: boolean;\n\n static readonly SCHEMA: SchemaShape<NoInlineTypeLiteralsConfig> = {\n mode: new FieldDef('string', INLINE_TYPE_MODES),\n disableAllowed: FieldDef.optional('boolean'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\nexport class NoAnyUnknownConfig extends BaseRuleConfig {\n declare mode?: ModifiedCodeMode;\n disableAllowed?: boolean;\n\n static readonly SCHEMA: SchemaShape<NoAnyUnknownConfig> = {\n mode: new FieldDef('string', MODIFIED_CODE_MODES),\n disableAllowed: FieldDef.optional('boolean'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\nexport class NoImplicitAnyConfig extends BaseRuleConfig {\n declare mode?: ModifiedCodeMode;\n disableAllowed?: boolean;\n\n static readonly SCHEMA: SchemaShape<NoImplicitAnyConfig> = {\n mode: new FieldDef('string', MODIFIED_CODE_MODES),\n disableAllowed: FieldDef.optional('boolean'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\nexport class PrismaValidateDtosConfig extends BaseRuleConfig {\n declare mode?: PrismaValidateDtosMode;\n disableAllowed?: boolean;\n prismaSchemaPath?: string;\n dtoSourcePaths?: string[];\n\n static readonly SCHEMA: SchemaShape<PrismaValidateDtosConfig> = {\n mode: new FieldDef('string', PRISMA_DTOS_MODES),\n disableAllowed: FieldDef.optional('boolean'),\n prismaSchemaPath: FieldDef.optional('string'),\n dtoSourcePaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\nexport class PrismaConverterConfig extends BaseRuleConfig {\n declare mode?: PrismaConverterMode;\n disableAllowed?: boolean;\n schemaPath?: string;\n convertersPaths?: string[];\n enforcePaths?: string[];\n\n static readonly SCHEMA: SchemaShape<PrismaConverterConfig> = {\n mode: new FieldDef('string', PRISMA_CONVERTER_MODES),\n disableAllowed: FieldDef.optional('boolean'),\n schemaPath: FieldDef.optional('string'),\n convertersPaths: FieldDef.optional('string[]'),\n enforcePaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n// `allowedPaths` exempts whole file trees whose idioms are destructuring by construction (React /\n// React Native components and hooks — `const [x, setX] = useState()`, destructured props — framework\n// glue), matched with the shared glob/prefix/segment semantics of `isPathExcluded`. It is the ONLY\n// escape when `disableAllowed: false`, since that setting deliberately ignores inline disables.\nexport class NoDestructureConfig extends BaseRuleConfig {\n declare mode?: ModifiedCodeMode;\n allowTopLevel?: boolean;\n disableAllowed?: boolean;\n allowedPaths?: string[];\n\n static readonly SCHEMA: SchemaShape<NoDestructureConfig> = {\n mode: new FieldDef('string', MODIFIED_CODE_MODES),\n allowTopLevel: FieldDef.optional('boolean'),\n disableAllowed: FieldDef.optional('boolean'),\n allowedPaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\nexport class NoUnmanagedExceptionsConfig extends BaseRuleConfig {\n declare mode?: ModifiedCodeMode;\n disableAllowed?: boolean;\n\n static readonly SCHEMA: SchemaShape<NoUnmanagedExceptionsConfig> = {\n mode: new FieldDef('string', MODIFIED_CODE_MODES),\n disableAllowed: FieldDef.optional('boolean'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\nexport class CatchErrorPatternConfig extends BaseRuleConfig {\n declare mode?: ModifiedCodeMode;\n disableAllowed?: boolean;\n\n static readonly SCHEMA: SchemaShape<CatchErrorPatternConfig> = {\n mode: new FieldDef('string', MODIFIED_CODE_MODES),\n disableAllowed: FieldDef.optional('boolean'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\nexport class AngularNoDirectApiInResolverConfig extends BaseRuleConfig {\n declare mode?: DirectApiResolverMode;\n disableAllowed?: boolean;\n enforcePaths?: string[];\n\n static readonly SCHEMA: SchemaShape<AngularNoDirectApiInResolverConfig> = {\n mode: new FieldDef('string', DIRECT_API_RESOLVER_MODES),\n disableAllowed: FieldDef.optional('boolean'),\n enforcePaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n// Bans hand-written CSS in Angular sources (styles:/styleUrls:/styleUrl: in @Component, and inline\n// style=/[style.x]/[ngStyle] in templates) so teams style with Tailwind utility classes. `allowGlobs`\n// exempts paths WITHIN the Angular scope (e.g. a vendored Fuse kit copied verbatim with its own CSS).\nexport class NoCustomCssConfig extends BaseRuleConfig {\n declare mode?: ModifiedCodeMode;\n disableAllowed?: boolean;\n allowGlobs?: string[];\n\n static readonly SCHEMA: SchemaShape<NoCustomCssConfig> = {\n mode: new FieldDef('string', MODIFIED_CODE_MODES),\n disableAllowed: FieldDef.optional('boolean'),\n allowGlobs: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\nexport class NoSymbolDiTokensConfig extends BaseRuleConfig {\n declare mode?: ModifiedCodeMode;\n disableAllowed?: boolean;\n allowedPaths?: string[];\n\n static readonly SCHEMA: SchemaShape<NoSymbolDiTokensConfig> = {\n mode: new FieldDef('string', MODIFIED_CODE_MODES),\n disableAllowed: FieldDef.optional('boolean'),\n allowedPaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n// Flags `process.exit(...)` outside a main()/runMain wrapper (and `import { main }`) so a deep exit\n// can't silently kill a reused server/command. Gradual-rollout knobs via the standard base: mode\n// (OFF | NEW_AND_MODIFIED_CODE | NEW_AND_MODIFIED_FILES), turnOffRuleUntilEpoch, branch, and\n// disableAllowed for the inline `// webpieces-disable` escape at genuine terminal boundaries.\nexport class NoProcessExitOutsideMainConfig extends BaseRuleConfig {\n declare mode?: ModifiedCodeMode;\n disableAllowed?: boolean;\n\n static readonly SCHEMA: SchemaShape<NoProcessExitOutsideMainConfig> = {\n mode: new FieldDef('string', MODIFIED_CODE_MODES),\n disableAllowed: FieldDef.optional('boolean'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n// Flags a function CREATED OUTSIDE A CLASS at module scope: a top-level `function foo()` declaration\n// or a top-level `const foo = () => {}` / `= function(){}`. The point is that webpieces DI +\n// @DocumentDesign only work when behavior lives in injectable classes — a module-scope function is a\n// dead-end the DI graph can't reach. Inline callbacks, nested functions inside methods, and non-function\n// top-level consts (objects, zod schemas, primitives) are NOT flagged. Standard rollout knobs via the\n// base: mode (OFF | NEW_AND_MODIFIED_CODE | NEW_AND_MODIFIED_FILES), turnOffRuleUntilEpoch, branch,\n// and disableAllowed for the inline `// webpieces-disable` escape. `allowedPaths` exempts whole file\n// trees that legitimately live outside the class-per-behavior model (e.g. React component/hook files,\n// framework glue), matched with the shared glob/prefix/segment semantics of `isPathExcluded`.\nexport class NoFunctionOutsideClassConfig extends BaseRuleConfig {\n declare mode?: ModifiedCodeMode;\n disableAllowed?: boolean;\n allowedPaths?: string[];\n\n static readonly SCHEMA: SchemaShape<NoFunctionOutsideClassConfig> = {\n mode: new FieldDef('string', MODIFIED_CODE_MODES),\n disableAllowed: FieldDef.optional('boolean'),\n allowedPaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n// inject-annotation-not-needed-for-concrete-class — flags a REDUNDANT `@inject(X)` whose token is\n// textually identical to the parameter's own declared type (`@inject(Foo) private readonly foo: Foo`).\n// In this inversify setup the decorator is pure noise there: reflect-metadata (emitDecoratorMetadata)\n// already resolves a constructor parameter by its class type, so `private readonly foo: Foo` binds on\n// its own (see CLAUDE.md, and the no-symbol-di-tokens rule that pushes the same way). Symbol/interface\n// tokens are NOT flagged because they never equal the type (`@inject(FOO_TOKEN) x: Provider<Foo>`).\n// AI keeps carpet-bombing `@inject`; this fails the build on the redundant form. Standard rollout knobs\n// via the base: mode (OFF | NEW_AND_MODIFIED_CODE | NEW_AND_MODIFIED_FILES), turnOffRuleUntilEpoch,\n// branch, and disableAllowed for the inline `// webpieces-disable` escape. `allowedPaths` exempts whole\n// file trees, matched with the shared glob/prefix/segment semantics.\nexport class InjectAnnotationNotNeededForConcreteClassConfig extends BaseRuleConfig {\n declare mode?: ModifiedCodeMode;\n disableAllowed?: boolean;\n allowedPaths?: string[];\n\n static readonly SCHEMA: SchemaShape<InjectAnnotationNotNeededForConcreteClassConfig> = {\n mode: new FieldDef('string', MODIFIED_CODE_MODES),\n disableAllowed: FieldDef.optional('boolean'),\n allowedPaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n// framework-tag — every project that a changed source file belongs to must carry >=1\n// `framework:<browser|react|angular|node|express|react-native>` nx tag in its project.json. Those tags are the\n// project's \"libType\" — the SET of runtime environments it runs in — and the source of truth for\n// the dependencies.json `framework` field and the `library-types-match-client` rule. Multiple tags\n// are allowed (the env set) and values are validated against the known set (`framework:all` is a\n// hard error). `knownTypes` customizes that set (defaults to browser, react, angular, node, express,\n// react-native — the last a first-class runtime, not a browser, #1064).\nexport class FrameworkTagConfig extends BaseRuleConfig {\n declare mode?: ProjectMode;\n knownTypes?: string[];\n\n static readonly SCHEMA: SchemaShape<FrameworkTagConfig> = {\n mode: new FieldDef('string', PROJECT_MODES),\n knownTypes: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n// role-tag — every project that a changed source file belongs to must carry a\n// `role:<server|app|bundle|designed-lib|lib|client|api-lib|api-client>` nx tag in its project.json. That tag is the project's\n// ROLE (orthogonal to `framework` libType) — the source of truth for the dependencies.json `role`\n// field, the `role-dependency` edge rule (apps are never depended upon), and DI-design generation\n// (server→@Controller, designed-lib→@ApiImplementation, lib→none, client→angular design).\n// `knownTypes` customizes the list suggested to the author when a tag is missing.\nexport class RoleTagConfig extends BaseRuleConfig {\n declare mode?: ProjectMode;\n knownTypes?: string[];\n\n static readonly SCHEMA: SchemaShape<RoleTagConfig> = {\n mode: new FieldDef('string', PROJECT_MODES),\n knownTypes: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n// Touching a project audits every production API contract it directly owns.\nexport class EnsureWeAreSecureConfig extends BaseRuleConfig {\n declare mode?: ProjectMode;\n static readonly SCHEMA: SchemaShape<EnsureWeAreSecureConfig> = {\n mode: new FieldDef('string', PROJECT_MODES),\n ...BASE_RULE_SCHEMA,\n };\n}\n"]}
@@ -0,0 +1,66 @@
1
+ import { SchemaShape, BaseRuleConfig } from "@webpieces/rules-sdk";
2
+ /**
3
+ * The five rules that make an nx `framework:*` / `role:*` tag TRUE (#1064). Before them a tag was a
4
+ * promise only the dependency graph checked; the code inside a library, the folder it lives in and the
5
+ * packages it imports were never compared with it.
6
+ *
7
+ * Three are GRAPH rules (they read the whole nx project graph, so they run in `architecture:generate`
8
+ * and `validate-architecture-unchanged` beside `library-types-match-client`): `api-lib-dependencies`,
9
+ * `api-lib-path` and `framework-folder`. Two are PROJECT rules in `@webpieces/code-rules`:
10
+ * `framework-tsconfig` and `framework-packages`.
11
+ *
12
+ * Every field that decides behaviour is REQUIRED with no default (`.claude/rules/no-rule-defaults.md`):
13
+ * which packages an api library may import, which folders hold which runtimes, and which framework
14
+ * packages belong to which runtime are the CONSUMER's layout, never webpieces'. The recommended values
15
+ * are SEEDED into a fresh config (seed-entry.ts) and documented in `.claude/rules/framework-tags.md`.
16
+ */
17
+ /**
18
+ * The modes of the two PROJECT rules: OFF, MODIFIED_PROJECTS (every project owning a changed file) or
19
+ * RUN_EVERY_TIME (every project in the repo — the migration sweep).
20
+ */
21
+ export declare const PROJECT_SCAN_MODES: readonly ["OFF", "MODIFIED_PROJECTS", "RUN_EVERY_TIME"];
22
+ export type ProjectScanMode = typeof PROJECT_SCAN_MODES[number];
23
+ /**
24
+ * `framework-tsconfig` (D7) — the COMPILER enforces the runtime a library's framework tags promise. Its
25
+ * `tsconfig.lib.json` (with everything it `extends`) must resolve to:
26
+ * - every env a browser one (browser / angular / react): `lib` includes `dom`, `types` excludes `node`;
27
+ * - every env a node one (node / express): `lib` excludes `dom`, `types` includes `node`;
28
+ * - anything else (universal, browser + react-native, react-native): `lib` excludes `dom`, `types`
29
+ * excludes `node` — pure TypeScript.
30
+ * An unset `lib` resolves to TypeScript's default, which includes `dom`; an unset `types` includes every
31
+ * installed `@types/*`, so it counts as including `node`. Both must therefore be stated.
32
+ *
33
+ * - `mode` — OFF | MODIFIED_PROJECTS | RUN_EVERY_TIME.
34
+ * - `allowedPaths` — optional globs over project roots this rule skips.
35
+ */
36
+ export declare class FrameworkTsconfigConfig extends BaseRuleConfig {
37
+ mode?: ProjectScanMode;
38
+ allowedPaths?: string[];
39
+ static readonly SCHEMA: SchemaShape<FrameworkTsconfigConfig>;
40
+ }
41
+ /** Framework packages and the runtimes that may import them. Data-only. */
42
+ export declare class FrameworkPackagesEntry {
43
+ /** Package-name globs, e.g. `["@angular/*"]` or `["react", "react-native", "expo*"]`. Non-empty. */
44
+ packages: string[];
45
+ /** The framework tags allowed to import them, e.g. `["angular"]`. Non-empty. */
46
+ frameworks: string[];
47
+ static readonly SCHEMA: SchemaShape<FrameworkPackagesEntry>;
48
+ }
49
+ /**
50
+ * `framework-packages` (D8) — a framework package is imported only by a project whose EVERY framework
51
+ * tag is one its entry allows. A `browser+node` library importing `firebase-admin` is refused (its
52
+ * browser env cannot run it); a `react` library importing `react` is not.
53
+ *
54
+ * Only production source is read (specs and test setup are not the runtime). A package no entry names
55
+ * is not judged.
56
+ *
57
+ * - `mode` — OFF | MODIFIED_PROJECTS | RUN_EVERY_TIME.
58
+ * - `entries` — required, non-empty. The recommended list is in `.claude/rules/framework-tags.md`.
59
+ * - `allowedPaths` — optional globs over project roots this rule skips.
60
+ */
61
+ export declare class FrameworkPackagesConfig extends BaseRuleConfig {
62
+ mode?: ProjectScanMode;
63
+ entries: FrameworkPackagesEntry[];
64
+ allowedPaths?: string[];
65
+ static readonly SCHEMA: SchemaShape<FrameworkPackagesConfig>;
66
+ }
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FrameworkPackagesConfig = exports.FrameworkPackagesEntry = exports.FrameworkTsconfigConfig = exports.PROJECT_SCAN_MODES = void 0;
4
+ const rules_sdk_1 = require("@webpieces/rules-sdk");
5
+ /**
6
+ * The five rules that make an nx `framework:*` / `role:*` tag TRUE (#1064). Before them a tag was a
7
+ * promise only the dependency graph checked; the code inside a library, the folder it lives in and the
8
+ * packages it imports were never compared with it.
9
+ *
10
+ * Three are GRAPH rules (they read the whole nx project graph, so they run in `architecture:generate`
11
+ * and `validate-architecture-unchanged` beside `library-types-match-client`): `api-lib-dependencies`,
12
+ * `api-lib-path` and `framework-folder`. Two are PROJECT rules in `@webpieces/code-rules`:
13
+ * `framework-tsconfig` and `framework-packages`.
14
+ *
15
+ * Every field that decides behaviour is REQUIRED with no default (`.claude/rules/no-rule-defaults.md`):
16
+ * which packages an api library may import, which folders hold which runtimes, and which framework
17
+ * packages belong to which runtime are the CONSUMER's layout, never webpieces'. The recommended values
18
+ * are SEEDED into a fresh config (seed-entry.ts) and documented in `.claude/rules/framework-tags.md`.
19
+ */
20
+ /**
21
+ * The modes of the two PROJECT rules: OFF, MODIFIED_PROJECTS (every project owning a changed file) or
22
+ * RUN_EVERY_TIME (every project in the repo — the migration sweep).
23
+ */
24
+ exports.PROJECT_SCAN_MODES = ['OFF', 'MODIFIED_PROJECTS', 'RUN_EVERY_TIME'];
25
+ /**
26
+ * `framework-tsconfig` (D7) — the COMPILER enforces the runtime a library's framework tags promise. Its
27
+ * `tsconfig.lib.json` (with everything it `extends`) must resolve to:
28
+ * - every env a browser one (browser / angular / react): `lib` includes `dom`, `types` excludes `node`;
29
+ * - every env a node one (node / express): `lib` excludes `dom`, `types` includes `node`;
30
+ * - anything else (universal, browser + react-native, react-native): `lib` excludes `dom`, `types`
31
+ * excludes `node` — pure TypeScript.
32
+ * An unset `lib` resolves to TypeScript's default, which includes `dom`; an unset `types` includes every
33
+ * installed `@types/*`, so it counts as including `node`. Both must therefore be stated.
34
+ *
35
+ * - `mode` — OFF | MODIFIED_PROJECTS | RUN_EVERY_TIME.
36
+ * - `allowedPaths` — optional globs over project roots this rule skips.
37
+ */
38
+ class FrameworkTsconfigConfig extends rules_sdk_1.BaseRuleConfig {
39
+ allowedPaths;
40
+ static SCHEMA = {
41
+ mode: new rules_sdk_1.FieldDef('string', exports.PROJECT_SCAN_MODES),
42
+ allowedPaths: rules_sdk_1.FieldDef.optional('string[]'),
43
+ ...rules_sdk_1.BASE_RULE_SCHEMA,
44
+ };
45
+ }
46
+ exports.FrameworkTsconfigConfig = FrameworkTsconfigConfig;
47
+ /** Framework packages and the runtimes that may import them. Data-only. */
48
+ class FrameworkPackagesEntry {
49
+ /** Package-name globs, e.g. `["@angular/*"]` or `["react", "react-native", "expo*"]`. Non-empty. */
50
+ packages;
51
+ /** The framework tags allowed to import them, e.g. `["angular"]`. Non-empty. */
52
+ frameworks;
53
+ static SCHEMA = {
54
+ packages: rules_sdk_1.FieldDef.nonEmptyStrings(),
55
+ frameworks: rules_sdk_1.FieldDef.nonEmptyStrings(),
56
+ };
57
+ }
58
+ exports.FrameworkPackagesEntry = FrameworkPackagesEntry;
59
+ /**
60
+ * `framework-packages` (D8) — a framework package is imported only by a project whose EVERY framework
61
+ * tag is one its entry allows. A `browser+node` library importing `firebase-admin` is refused (its
62
+ * browser env cannot run it); a `react` library importing `react` is not.
63
+ *
64
+ * Only production source is read (specs and test setup are not the runtime). A package no entry names
65
+ * is not judged.
66
+ *
67
+ * - `mode` — OFF | MODIFIED_PROJECTS | RUN_EVERY_TIME.
68
+ * - `entries` — required, non-empty. The recommended list is in `.claude/rules/framework-tags.md`.
69
+ * - `allowedPaths` — optional globs over project roots this rule skips.
70
+ */
71
+ class FrameworkPackagesConfig extends rules_sdk_1.BaseRuleConfig {
72
+ entries;
73
+ allowedPaths;
74
+ static SCHEMA = {
75
+ mode: new rules_sdk_1.FieldDef('string', exports.PROJECT_SCAN_MODES),
76
+ entries: rules_sdk_1.FieldDef.nonEmptyObjects(FrameworkPackagesEntry.SCHEMA),
77
+ allowedPaths: rules_sdk_1.FieldDef.optional('string[]'),
78
+ ...rules_sdk_1.BASE_RULE_SCHEMA,
79
+ };
80
+ }
81
+ exports.FrameworkPackagesConfig = FrameworkPackagesConfig;
82
+ //# sourceMappingURL=tag-truth-configs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag-truth-configs.js","sourceRoot":"","sources":["../../../../../../packages/tooling/code-rules/src/configs/tag-truth-configs.ts"],"names":[],"mappings":";;;AAAA,oDAA+F;AAC/F;;;;;;;;;;;;;;GAcG;AAEH;;;GAGG;AACU,QAAA,kBAAkB,GAAG,CAAC,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,CAAU,CAAC;AAI1F;;;;;;;;;;;;GAYG;AACH,MAAa,uBAAwB,SAAQ,0BAAc;IAEvD,YAAY,CAAY;IAExB,MAAM,CAAU,MAAM,GAAyC;QAC3D,IAAI,EAAE,IAAI,oBAAQ,CAAC,QAAQ,EAAE,0BAAkB,CAAC;QAChD,YAAY,EAAE,oBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC3C,GAAG,4BAAgB;KACtB,CAAC;;AARN,0DASC;AAED,2EAA2E;AAC3E,MAAa,sBAAsB;IAC/B,oGAAoG;IACpG,QAAQ,CAAY;IACpB,gFAAgF;IAChF,UAAU,CAAY;IAEtB,MAAM,CAAU,MAAM,GAAwC;QAC1D,QAAQ,EAAE,oBAAQ,CAAC,eAAe,EAAE;QACpC,UAAU,EAAE,oBAAQ,CAAC,eAAe,EAAE;KACzC,CAAC;;AATN,wDAUC;AAED;;;;;;;;;;;GAWG;AACH,MAAa,uBAAwB,SAAQ,0BAAc;IAEvD,OAAO,CAA4B;IACnC,YAAY,CAAY;IAExB,MAAM,CAAU,MAAM,GAAyC;QAC3D,IAAI,EAAE,IAAI,oBAAQ,CAAC,QAAQ,EAAE,0BAAkB,CAAC;QAChD,OAAO,EAAE,oBAAQ,CAAC,eAAe,CAAC,sBAAsB,CAAC,MAAM,CAAC;QAChE,YAAY,EAAE,oBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC3C,GAAG,4BAAgB;KACtB,CAAC;;AAVN,0DAWC","sourcesContent":["import { FieldDef, SchemaShape, BaseRuleConfig, BASE_RULE_SCHEMA } from \"@webpieces/rules-sdk\";\n/**\n * The five rules that make an nx `framework:*` / `role:*` tag TRUE (#1064). Before them a tag was a\n * promise only the dependency graph checked; the code inside a library, the folder it lives in and the\n * packages it imports were never compared with it.\n *\n * Three are GRAPH rules (they read the whole nx project graph, so they run in `architecture:generate`\n * and `validate-architecture-unchanged` beside `library-types-match-client`): `api-lib-dependencies`,\n * `api-lib-path` and `framework-folder`. Two are PROJECT rules in `@webpieces/code-rules`:\n * `framework-tsconfig` and `framework-packages`.\n *\n * Every field that decides behaviour is REQUIRED with no default (`.claude/rules/no-rule-defaults.md`):\n * which packages an api library may import, which folders hold which runtimes, and which framework\n * packages belong to which runtime are the CONSUMER's layout, never webpieces'. The recommended values\n * are SEEDED into a fresh config (seed-entry.ts) and documented in `.claude/rules/framework-tags.md`.\n */\n\n/**\n * The modes of the two PROJECT rules: OFF, MODIFIED_PROJECTS (every project owning a changed file) or\n * RUN_EVERY_TIME (every project in the repo — the migration sweep).\n */\nexport const PROJECT_SCAN_MODES = ['OFF', 'MODIFIED_PROJECTS', 'RUN_EVERY_TIME'] as const;\n\nexport type ProjectScanMode = typeof PROJECT_SCAN_MODES[number];\n\n/**\n * `framework-tsconfig` (D7) — the COMPILER enforces the runtime a library's framework tags promise. Its\n * `tsconfig.lib.json` (with everything it `extends`) must resolve to:\n * - every env a browser one (browser / angular / react): `lib` includes `dom`, `types` excludes `node`;\n * - every env a node one (node / express): `lib` excludes `dom`, `types` includes `node`;\n * - anything else (universal, browser + react-native, react-native): `lib` excludes `dom`, `types`\n * excludes `node` — pure TypeScript.\n * An unset `lib` resolves to TypeScript's default, which includes `dom`; an unset `types` includes every\n * installed `@types/*`, so it counts as including `node`. Both must therefore be stated.\n *\n * - `mode` — OFF | MODIFIED_PROJECTS | RUN_EVERY_TIME.\n * - `allowedPaths` — optional globs over project roots this rule skips.\n */\nexport class FrameworkTsconfigConfig extends BaseRuleConfig {\n declare mode?: ProjectScanMode;\n allowedPaths?: string[];\n\n static readonly SCHEMA: SchemaShape<FrameworkTsconfigConfig> = {\n mode: new FieldDef('string', PROJECT_SCAN_MODES),\n allowedPaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n/** Framework packages and the runtimes that may import them. Data-only. */\nexport class FrameworkPackagesEntry {\n /** Package-name globs, e.g. `[\"@angular/*\"]` or `[\"react\", \"react-native\", \"expo*\"]`. Non-empty. */\n packages!: string[];\n /** The framework tags allowed to import them, e.g. `[\"angular\"]`. Non-empty. */\n frameworks!: string[];\n\n static readonly SCHEMA: SchemaShape<FrameworkPackagesEntry> = {\n packages: FieldDef.nonEmptyStrings(),\n frameworks: FieldDef.nonEmptyStrings(),\n };\n}\n\n/**\n * `framework-packages` (D8) — a framework package is imported only by a project whose EVERY framework\n * tag is one its entry allows. A `browser+node` library importing `firebase-admin` is refused (its\n * browser env cannot run it); a `react` library importing `react` is not.\n *\n * Only production source is read (specs and test setup are not the runtime). A package no entry names\n * is not judged.\n *\n * - `mode` — OFF | MODIFIED_PROJECTS | RUN_EVERY_TIME.\n * - `entries` — required, non-empty. The recommended list is in `.claude/rules/framework-tags.md`.\n * - `allowedPaths` — optional globs over project roots this rule skips.\n */\nexport class FrameworkPackagesConfig extends BaseRuleConfig {\n declare mode?: ProjectScanMode;\n entries!: FrameworkPackagesEntry[];\n allowedPaths?: string[];\n\n static readonly SCHEMA: SchemaShape<FrameworkPackagesConfig> = {\n mode: new FieldDef('string', PROJECT_SCAN_MODES),\n entries: FieldDef.nonEmptyObjects(FrameworkPackagesEntry.SCHEMA),\n allowedPaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n"]}
package/src/index.d.ts CHANGED
@@ -37,3 +37,13 @@ export { CodeRulesBootstrap } from './code-rules-bootstrap';
37
37
  export { CodeRulesRunRequest, RuleSelection, RunRequestParser } from './code-rules-run-request';
38
38
  export { ScanScope, GateScanScope, ScanRestriction, ProjectCatalog, ProjectEntry, RecordedSite } from './scan-scope';
39
39
  export { ReactNativeCompatibility } from './react-native-compatibility';
40
+ export { METHOD_LIMIT_MODES, RETURN_TYPE_MODES, INLINE_TYPE_MODES, PROJECT_MODES, PRISMA_DTOS_MODES, PRISMA_CONVERTER_MODES, DIRECT_API_RESOLVER_MODES, MaxMethodLinesConfig, MaxFileLinesConfig, RequireReturnTypeConfig, NoInlineTypeLiteralsConfig, NoAnyUnknownConfig, NoImplicitAnyConfig, PrismaValidateDtosConfig, PrismaConverterConfig, NoDestructureConfig, NoUnmanagedExceptionsConfig, CatchErrorPatternConfig, AngularNoDirectApiInResolverConfig, NoCustomCssConfig, NoSymbolDiTokensConfig, NoProcessExitOutsideMainConfig, NoFunctionOutsideClassConfig, InjectAnnotationNotNeededForConcreteClassConfig, FrameworkTagConfig, RoleTagConfig, EnsureWeAreSecureConfig } from './configs/rule-configs';
41
+ export type { MethodLimitMode, ReturnTypeMode, InlineTypeMode, ProjectMode, PrismaValidateDtosMode, PrismaConverterMode, DirectApiResolverMode } from './configs/rule-configs';
42
+ export { CLIENT_CREATION_SEVERITIES, NoClientCreationOutsideServerOrClientConfig } from './configs/no-client-creation-config';
43
+ export type { ClientCreationSeverity } from './configs/no-client-creation-config';
44
+ export { DEFAULT_TEMPLATE_DIRS, DEFAULT_BANNED_STATE_PATH_PREFIXES, NoStatePathsInTemplatesConfig } from './configs/no-state-paths-config';
45
+ export { NoInlineImportInApiLibConfig, OneEnumSpellingInApiLibConfig } from './configs/api-lib-spelling-configs';
46
+ export { NoUtilityTypesInApiLibConfig } from './configs/no-utility-types-config';
47
+ export { RequiredTypeSuffixEntry, RequiredTypeSuffixConfig } from './configs/required-type-suffix-config';
48
+ export { PROJECT_SCAN_MODES, FrameworkTsconfigConfig, FrameworkPackagesEntry, FrameworkPackagesConfig } from './configs/tag-truth-configs';
49
+ export type { ProjectScanMode } from './configs/tag-truth-configs';
package/src/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.frameworkTsconfigError = exports.TsconfigRuntimeViolation = exports.RuntimeCompilerOptions = exports.FrameworkTsconfigAudit = exports.FrameworkTsconfigValidator = exports.ScannedProject = exports.ProjectScanTargets = exports.ApiLibEnumIndex = exports.GoverningGlob = exports.SuffixRename = exports.SuffixEntryPicker = exports.ExportedTypeScanner = exports.RequiredTypeSuffixValidator = exports.UtilityTypeScanner = exports.NoUtilityTypesInApiLibValidator = exports.EnumSpellingScanner = exports.OneEnumSpellingInApiLibValidator = exports.InlineImportScanner = exports.NoInlineImportInApiLibValidator = exports.ApiLibSite = exports.ApiLibFile = exports.findDirectlyChangedProjectRoots = exports.auditSecurityContracts = exports.SecurityContractViolation = exports.EnsureWeAreSecureValidator = exports.RoleTagValidator = exports.FrameworkTagValidator = exports.findRedundantInjectInSource = exports.InjectAnnotationNotNeededForConcreteClassValidator = exports.NoFunctionOutsideClassValidator = exports.NoProcessExitOutsideMainValidator = exports.ProjectRoleResolver = exports.StatePathViolation = exports.StatePathHit = exports.NoStatePathsInTemplatesValidator = exports.NoClientCreationOutsideServerOrClientValidator = exports.NoSymbolDiTokensValidator = exports.NoDirectApiResolverValidator = exports.NoDestructureValidator = exports.NoUnmanagedExceptionsValidator = exports.CatchErrorPatternValidator = exports.NoInlineTypeLiteralsValidator = exports.RequireReturnTypeValidator = exports.MaxFileLinesValidator = exports.runNewMethods = exports.runModifiedMethods = exports.MaxMethodLinesValidator = exports.NoImplicitAnyValidator = exports.NoAnyUnknownValidator = exports.CodeValidator = void 0;
4
- exports.ReactNativeCompatibility = exports.RecordedSite = exports.ProjectEntry = exports.ProjectCatalog = exports.ScanRestriction = exports.GateScanScope = exports.ScanScope = exports.RunRequestParser = exports.RuleSelection = exports.CodeRulesRunRequest = exports.CodeRulesBootstrap = exports.validateCode = exports.PrismaConverterValidator = exports.PrismaValidateDtosValidator = exports.EnumText = exports.frameworkPackagesError = exports.FrameworkPackageViolation = exports.FrameworkPackagesAudit = exports.FrameworkPackagesValidator = void 0;
4
+ exports.DEFAULT_BANNED_STATE_PATH_PREFIXES = exports.DEFAULT_TEMPLATE_DIRS = exports.NoClientCreationOutsideServerOrClientConfig = exports.CLIENT_CREATION_SEVERITIES = exports.EnsureWeAreSecureConfig = exports.RoleTagConfig = exports.FrameworkTagConfig = exports.InjectAnnotationNotNeededForConcreteClassConfig = exports.NoFunctionOutsideClassConfig = exports.NoProcessExitOutsideMainConfig = exports.NoSymbolDiTokensConfig = exports.NoCustomCssConfig = exports.AngularNoDirectApiInResolverConfig = exports.CatchErrorPatternConfig = exports.NoUnmanagedExceptionsConfig = exports.NoDestructureConfig = exports.PrismaConverterConfig = exports.PrismaValidateDtosConfig = exports.NoImplicitAnyConfig = exports.NoAnyUnknownConfig = exports.NoInlineTypeLiteralsConfig = exports.RequireReturnTypeConfig = exports.MaxFileLinesConfig = exports.MaxMethodLinesConfig = exports.DIRECT_API_RESOLVER_MODES = exports.PRISMA_CONVERTER_MODES = exports.PRISMA_DTOS_MODES = exports.PROJECT_MODES = exports.INLINE_TYPE_MODES = exports.RETURN_TYPE_MODES = exports.METHOD_LIMIT_MODES = exports.ReactNativeCompatibility = exports.RecordedSite = exports.ProjectEntry = exports.ProjectCatalog = exports.ScanRestriction = exports.GateScanScope = exports.ScanScope = exports.RunRequestParser = exports.RuleSelection = exports.CodeRulesRunRequest = exports.CodeRulesBootstrap = exports.validateCode = exports.PrismaConverterValidator = exports.PrismaValidateDtosValidator = exports.EnumText = exports.frameworkPackagesError = exports.FrameworkPackageViolation = exports.FrameworkPackagesAudit = exports.FrameworkPackagesValidator = void 0;
5
+ exports.FrameworkPackagesConfig = exports.FrameworkPackagesEntry = exports.FrameworkTsconfigConfig = exports.PROJECT_SCAN_MODES = exports.RequiredTypeSuffixConfig = exports.RequiredTypeSuffixEntry = exports.NoUtilityTypesInApiLibConfig = exports.OneEnumSpellingInApiLibConfig = exports.NoInlineImportInApiLibConfig = exports.NoStatePathsInTemplatesConfig = void 0;
5
6
  const tslib_1 = require("tslib");
6
7
  var code_validator_1 = require("./code-validator");
7
8
  Object.defineProperty(exports, "CodeValidator", { enumerable: true, get: function () { return code_validator_1.CodeValidator; } });
@@ -111,4 +112,52 @@ Object.defineProperty(exports, "ProjectEntry", { enumerable: true, get: function
111
112
  Object.defineProperty(exports, "RecordedSite", { enumerable: true, get: function () { return scan_scope_1.RecordedSite; } });
112
113
  var react_native_compatibility_1 = require("./react-native-compatibility");
113
114
  Object.defineProperty(exports, "ReactNativeCompatibility", { enumerable: true, get: function () { return react_native_compatibility_1.ReactNativeCompatibility; } });
115
+ var rule_configs_1 = require("./configs/rule-configs");
116
+ Object.defineProperty(exports, "METHOD_LIMIT_MODES", { enumerable: true, get: function () { return rule_configs_1.METHOD_LIMIT_MODES; } });
117
+ Object.defineProperty(exports, "RETURN_TYPE_MODES", { enumerable: true, get: function () { return rule_configs_1.RETURN_TYPE_MODES; } });
118
+ Object.defineProperty(exports, "INLINE_TYPE_MODES", { enumerable: true, get: function () { return rule_configs_1.INLINE_TYPE_MODES; } });
119
+ Object.defineProperty(exports, "PROJECT_MODES", { enumerable: true, get: function () { return rule_configs_1.PROJECT_MODES; } });
120
+ Object.defineProperty(exports, "PRISMA_DTOS_MODES", { enumerable: true, get: function () { return rule_configs_1.PRISMA_DTOS_MODES; } });
121
+ Object.defineProperty(exports, "PRISMA_CONVERTER_MODES", { enumerable: true, get: function () { return rule_configs_1.PRISMA_CONVERTER_MODES; } });
122
+ Object.defineProperty(exports, "DIRECT_API_RESOLVER_MODES", { enumerable: true, get: function () { return rule_configs_1.DIRECT_API_RESOLVER_MODES; } });
123
+ Object.defineProperty(exports, "MaxMethodLinesConfig", { enumerable: true, get: function () { return rule_configs_1.MaxMethodLinesConfig; } });
124
+ Object.defineProperty(exports, "MaxFileLinesConfig", { enumerable: true, get: function () { return rule_configs_1.MaxFileLinesConfig; } });
125
+ Object.defineProperty(exports, "RequireReturnTypeConfig", { enumerable: true, get: function () { return rule_configs_1.RequireReturnTypeConfig; } });
126
+ Object.defineProperty(exports, "NoInlineTypeLiteralsConfig", { enumerable: true, get: function () { return rule_configs_1.NoInlineTypeLiteralsConfig; } });
127
+ Object.defineProperty(exports, "NoAnyUnknownConfig", { enumerable: true, get: function () { return rule_configs_1.NoAnyUnknownConfig; } });
128
+ Object.defineProperty(exports, "NoImplicitAnyConfig", { enumerable: true, get: function () { return rule_configs_1.NoImplicitAnyConfig; } });
129
+ Object.defineProperty(exports, "PrismaValidateDtosConfig", { enumerable: true, get: function () { return rule_configs_1.PrismaValidateDtosConfig; } });
130
+ Object.defineProperty(exports, "PrismaConverterConfig", { enumerable: true, get: function () { return rule_configs_1.PrismaConverterConfig; } });
131
+ Object.defineProperty(exports, "NoDestructureConfig", { enumerable: true, get: function () { return rule_configs_1.NoDestructureConfig; } });
132
+ Object.defineProperty(exports, "NoUnmanagedExceptionsConfig", { enumerable: true, get: function () { return rule_configs_1.NoUnmanagedExceptionsConfig; } });
133
+ Object.defineProperty(exports, "CatchErrorPatternConfig", { enumerable: true, get: function () { return rule_configs_1.CatchErrorPatternConfig; } });
134
+ Object.defineProperty(exports, "AngularNoDirectApiInResolverConfig", { enumerable: true, get: function () { return rule_configs_1.AngularNoDirectApiInResolverConfig; } });
135
+ Object.defineProperty(exports, "NoCustomCssConfig", { enumerable: true, get: function () { return rule_configs_1.NoCustomCssConfig; } });
136
+ Object.defineProperty(exports, "NoSymbolDiTokensConfig", { enumerable: true, get: function () { return rule_configs_1.NoSymbolDiTokensConfig; } });
137
+ Object.defineProperty(exports, "NoProcessExitOutsideMainConfig", { enumerable: true, get: function () { return rule_configs_1.NoProcessExitOutsideMainConfig; } });
138
+ Object.defineProperty(exports, "NoFunctionOutsideClassConfig", { enumerable: true, get: function () { return rule_configs_1.NoFunctionOutsideClassConfig; } });
139
+ Object.defineProperty(exports, "InjectAnnotationNotNeededForConcreteClassConfig", { enumerable: true, get: function () { return rule_configs_1.InjectAnnotationNotNeededForConcreteClassConfig; } });
140
+ Object.defineProperty(exports, "FrameworkTagConfig", { enumerable: true, get: function () { return rule_configs_1.FrameworkTagConfig; } });
141
+ Object.defineProperty(exports, "RoleTagConfig", { enumerable: true, get: function () { return rule_configs_1.RoleTagConfig; } });
142
+ Object.defineProperty(exports, "EnsureWeAreSecureConfig", { enumerable: true, get: function () { return rule_configs_1.EnsureWeAreSecureConfig; } });
143
+ var no_client_creation_config_1 = require("./configs/no-client-creation-config");
144
+ Object.defineProperty(exports, "CLIENT_CREATION_SEVERITIES", { enumerable: true, get: function () { return no_client_creation_config_1.CLIENT_CREATION_SEVERITIES; } });
145
+ Object.defineProperty(exports, "NoClientCreationOutsideServerOrClientConfig", { enumerable: true, get: function () { return no_client_creation_config_1.NoClientCreationOutsideServerOrClientConfig; } });
146
+ var no_state_paths_config_1 = require("./configs/no-state-paths-config");
147
+ Object.defineProperty(exports, "DEFAULT_TEMPLATE_DIRS", { enumerable: true, get: function () { return no_state_paths_config_1.DEFAULT_TEMPLATE_DIRS; } });
148
+ Object.defineProperty(exports, "DEFAULT_BANNED_STATE_PATH_PREFIXES", { enumerable: true, get: function () { return no_state_paths_config_1.DEFAULT_BANNED_STATE_PATH_PREFIXES; } });
149
+ Object.defineProperty(exports, "NoStatePathsInTemplatesConfig", { enumerable: true, get: function () { return no_state_paths_config_1.NoStatePathsInTemplatesConfig; } });
150
+ var api_lib_spelling_configs_1 = require("./configs/api-lib-spelling-configs");
151
+ Object.defineProperty(exports, "NoInlineImportInApiLibConfig", { enumerable: true, get: function () { return api_lib_spelling_configs_1.NoInlineImportInApiLibConfig; } });
152
+ Object.defineProperty(exports, "OneEnumSpellingInApiLibConfig", { enumerable: true, get: function () { return api_lib_spelling_configs_1.OneEnumSpellingInApiLibConfig; } });
153
+ var no_utility_types_config_1 = require("./configs/no-utility-types-config");
154
+ Object.defineProperty(exports, "NoUtilityTypesInApiLibConfig", { enumerable: true, get: function () { return no_utility_types_config_1.NoUtilityTypesInApiLibConfig; } });
155
+ var required_type_suffix_config_1 = require("./configs/required-type-suffix-config");
156
+ Object.defineProperty(exports, "RequiredTypeSuffixEntry", { enumerable: true, get: function () { return required_type_suffix_config_1.RequiredTypeSuffixEntry; } });
157
+ Object.defineProperty(exports, "RequiredTypeSuffixConfig", { enumerable: true, get: function () { return required_type_suffix_config_1.RequiredTypeSuffixConfig; } });
158
+ var tag_truth_configs_1 = require("./configs/tag-truth-configs");
159
+ Object.defineProperty(exports, "PROJECT_SCAN_MODES", { enumerable: true, get: function () { return tag_truth_configs_1.PROJECT_SCAN_MODES; } });
160
+ Object.defineProperty(exports, "FrameworkTsconfigConfig", { enumerable: true, get: function () { return tag_truth_configs_1.FrameworkTsconfigConfig; } });
161
+ Object.defineProperty(exports, "FrameworkPackagesEntry", { enumerable: true, get: function () { return tag_truth_configs_1.FrameworkPackagesEntry; } });
162
+ Object.defineProperty(exports, "FrameworkPackagesConfig", { enumerable: true, get: function () { return tag_truth_configs_1.FrameworkPackagesConfig; } });
114
163
  //# sourceMappingURL=index.js.map