@webpieces/code-rules 0.4.844 → 0.4.846
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/src/api-lib-source-rule.d.ts +4 -1
- package/src/api-lib-source-rule.js.map +1 -1
- package/src/code-rules-bootstrap.js +8 -7
- package/src/code-rules-bootstrap.js.map +1 -1
- package/src/code-rules-config-table.d.ts +9 -11
- package/src/code-rules-config-table.js +48 -33
- package/src/code-rules-config-table.js.map +1 -1
- package/src/configs/api-lib-spelling-configs.d.ts +40 -0
- package/src/configs/api-lib-spelling-configs.js +52 -0
- package/src/configs/api-lib-spelling-configs.js.map +1 -0
- package/src/configs/no-client-creation-config.d.ts +12 -0
- package/src/configs/no-client-creation-config.js +40 -0
- package/src/configs/no-client-creation-config.js.map +1 -0
- package/src/configs/no-state-paths-config.d.ts +41 -0
- package/src/configs/no-state-paths-config.js +51 -0
- package/src/configs/no-state-paths-config.js.map +1 -0
- package/src/configs/no-utility-types-config.d.ts +30 -0
- package/src/configs/no-utility-types-config.js +39 -0
- package/src/configs/no-utility-types-config.js.map +1 -0
- package/src/configs/required-type-suffix-config.d.ts +49 -0
- package/src/configs/required-type-suffix-config.js +62 -0
- package/src/configs/required-type-suffix-config.js.map +1 -0
- package/src/configs/rule-configs.d.ts +131 -0
- package/src/configs/rule-configs.js +309 -0
- package/src/configs/rule-configs.js.map +1 -0
- package/src/configs/tag-truth-configs.d.ts +66 -0
- package/src/configs/tag-truth-configs.js +82 -0
- package/src/configs/tag-truth-configs.js.map +1 -0
- package/src/index.d.ts +10 -0
- package/src/index.js +50 -1
- package/src/index.js.map +1 -1
- package/src/project-scan-targets.d.ts +2 -1
- package/src/project-scan-targets.js.map +1 -1
- package/src/rule-pack.d.ts +1 -0
- package/src/rule-pack.js +4 -35
- package/src/rule-pack.js.map +1 -1
- package/src/rule-settings.d.ts +5 -0
- package/src/rule-settings.js +269 -0
- package/src/rule-settings.js.map +1 -0
- package/src/scan-scope.d.ts +2 -1
- package/src/scan-scope.js.map +1 -1
- package/src/tag-rule.d.ts +1 -1
- package/src/tag-rule.js.map +1 -1
- package/src/validate-catch-error-pattern.d.ts +1 -1
- package/src/validate-catch-error-pattern.js +4 -3
- package/src/validate-catch-error-pattern.js.map +1 -1
- package/src/validate-dtos.d.ts +1 -1
- package/src/validate-dtos.js +2 -1
- package/src/validate-dtos.js.map +1 -1
- package/src/validate-ensure-we-are-secure.d.ts +2 -1
- package/src/validate-ensure-we-are-secure.js +3 -2
- package/src/validate-ensure-we-are-secure.js.map +1 -1
- package/src/validate-framework-packages.d.ts +2 -1
- package/src/validate-framework-packages.js +7 -6
- package/src/validate-framework-packages.js.map +1 -1
- package/src/validate-framework-tag.d.ts +1 -1
- package/src/validate-framework-tag.js +2 -2
- package/src/validate-framework-tag.js.map +1 -1
- package/src/validate-framework-tsconfig.d.ts +2 -1
- package/src/validate-framework-tsconfig.js +5 -4
- package/src/validate-framework-tsconfig.js.map +1 -1
- package/src/validate-inject-annotation-not-needed-for-concrete-class.d.ts +1 -1
- package/src/validate-inject-annotation-not-needed-for-concrete-class.js +3 -2
- package/src/validate-inject-annotation-not-needed-for-concrete-class.js.map +1 -1
- package/src/validate-match-rules.d.ts +1 -1
- package/src/validate-match-rules.js.map +1 -1
- package/src/validate-modified-files.d.ts +2 -1
- package/src/validate-modified-files.js +3 -2
- package/src/validate-modified-files.js.map +1 -1
- package/src/validate-modified-methods.d.ts +1 -1
- package/src/validate-modified-methods.js +4 -3
- package/src/validate-modified-methods.js.map +1 -1
- package/src/validate-new-methods.d.ts +1 -1
- package/src/validate-new-methods.js +1 -1
- package/src/validate-new-methods.js.map +1 -1
- package/src/validate-no-any-unknown.d.ts +1 -1
- package/src/validate-no-any-unknown.js +3 -2
- package/src/validate-no-any-unknown.js.map +1 -1
- package/src/validate-no-client-creation-outside-server-or-client.d.ts +1 -1
- package/src/validate-no-client-creation-outside-server-or-client.js +3 -2
- package/src/validate-no-client-creation-outside-server-or-client.js.map +1 -1
- package/src/validate-no-custom-css.d.ts +1 -1
- package/src/validate-no-custom-css.js +3 -2
- package/src/validate-no-custom-css.js.map +1 -1
- package/src/validate-no-destructure.d.ts +1 -1
- package/src/validate-no-destructure.js +3 -2
- package/src/validate-no-destructure.js.map +1 -1
- package/src/validate-no-direct-api-resolver.d.ts +1 -1
- package/src/validate-no-direct-api-resolver.js +3 -2
- package/src/validate-no-direct-api-resolver.js.map +1 -1
- package/src/validate-no-function-outside-class.d.ts +1 -1
- package/src/validate-no-function-outside-class.js +4 -3
- package/src/validate-no-function-outside-class.js.map +1 -1
- package/src/validate-no-implicit-any.d.ts +1 -1
- package/src/validate-no-implicit-any.js +3 -2
- package/src/validate-no-implicit-any.js.map +1 -1
- package/src/validate-no-inline-import-in-api-lib.d.ts +2 -1
- package/src/validate-no-inline-import-in-api-lib.js +3 -2
- package/src/validate-no-inline-import-in-api-lib.js.map +1 -1
- package/src/validate-no-inline-types.d.ts +1 -1
- package/src/validate-no-inline-types.js +3 -2
- package/src/validate-no-inline-types.js.map +1 -1
- package/src/validate-no-process-exit-outside-main.d.ts +1 -1
- package/src/validate-no-process-exit-outside-main.js +3 -2
- package/src/validate-no-process-exit-outside-main.js.map +1 -1
- package/src/validate-no-state-paths-in-templates.d.ts +1 -1
- package/src/validate-no-state-paths-in-templates.js +7 -6
- package/src/validate-no-state-paths-in-templates.js.map +1 -1
- package/src/validate-no-symbol-di-tokens.d.ts +1 -1
- package/src/validate-no-symbol-di-tokens.js +3 -2
- package/src/validate-no-symbol-di-tokens.js.map +1 -1
- package/src/validate-no-unmanaged-exceptions.d.ts +1 -1
- package/src/validate-no-unmanaged-exceptions.js +3 -2
- package/src/validate-no-unmanaged-exceptions.js.map +1 -1
- package/src/validate-no-utility-types-in-api-lib.d.ts +2 -1
- package/src/validate-no-utility-types-in-api-lib.js +3 -2
- package/src/validate-no-utility-types-in-api-lib.js.map +1 -1
- package/src/validate-one-enum-spelling-in-api-lib.d.ts +2 -1
- package/src/validate-one-enum-spelling-in-api-lib.js +3 -2
- package/src/validate-one-enum-spelling-in-api-lib.js.map +1 -1
- package/src/validate-prisma-converters.d.ts +1 -1
- package/src/validate-prisma-converters.js +3 -2
- package/src/validate-prisma-converters.js.map +1 -1
- package/src/validate-required-type-suffix.d.ts +2 -1
- package/src/validate-required-type-suffix.js +3 -2
- package/src/validate-required-type-suffix.js.map +1 -1
- package/src/validate-return-types.d.ts +1 -1
- package/src/validate-return-types.js +3 -2
- package/src/validate-return-types.js.map +1 -1
- package/src/validate-role-tag.d.ts +1 -1
- package/src/validate-role-tag.js +2 -2
- package/src/validate-role-tag.js.map +1 -1
- package/src/wp-ci.js +2 -2
- package/src/wp-ci.js.map +1 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SchemaShape, BaseRuleConfig } from "@webpieces/rules-sdk";
|
|
2
|
+
import { ModifiedCodeMode } from "@webpieces/rules-sdk";
|
|
3
|
+
/**
|
|
4
|
+
* The template dirs `no-state-paths-in-templates` looks at when a repo has not said otherwise:
|
|
5
|
+
* webpieces' own instruct-ai templates, which are the generated docs the rule was written for.
|
|
6
|
+
*
|
|
7
|
+
* A consumer repo that generates AI-facing docs from its own templates points `templateDirs` at them;
|
|
8
|
+
* a repo that generates none matches no files and the rule is a no-op. Seeded rather than left empty
|
|
9
|
+
* so the rule arrives doing the job it exists for instead of waiting to be discovered.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEFAULT_TEMPLATE_DIRS: readonly string[];
|
|
12
|
+
/**
|
|
13
|
+
* The path prefixes that must never be RESTATED in a generated doc, only computed.
|
|
14
|
+
*
|
|
15
|
+
* `.webpieces/` is the whole webpieces state tree, and every path under it is per-tree: a linked
|
|
16
|
+
* worktree's state lives at `<primary>/.webpieces/worktrees/<name>/…`, so the relative spelling names
|
|
17
|
+
* a file that does not exist there.
|
|
18
|
+
*/
|
|
19
|
+
export declare const DEFAULT_BANNED_STATE_PATH_PREFIXES: readonly string[];
|
|
20
|
+
/**
|
|
21
|
+
* Bans a hard-coded state path inside a GENERATED-doc template.
|
|
22
|
+
*
|
|
23
|
+
* The incident: `webpieces.git-workflow.md` restated `.webpieces/logs/branch-mutations.log`. That log
|
|
24
|
+
* is per-worktree, so the doc — regenerated into every governed repo and handed to an agent by
|
|
25
|
+
* absolute path as instruction — named a file that does not exist in half the trees that read it.
|
|
26
|
+
* Every one of these paths already has a resolver; the template engine already substitutes. The rule
|
|
27
|
+
* makes "restate it" the thing that fails and "render `{{PLACEHOLDER}}` from the resolver" the thing
|
|
28
|
+
* that passes.
|
|
29
|
+
*
|
|
30
|
+
* Diff-scoped like every other code rule, so the docs whose SUBJECT is the layout (they explain both
|
|
31
|
+
* rows on purpose) are not retroactively flooded — the rule bites when a template is next edited.
|
|
32
|
+
* A doc that genuinely has to print the literal says so out loud:
|
|
33
|
+
* `<!-- webpieces-disable no-state-paths-in-templates -- this table IS the layout -->`.
|
|
34
|
+
*/
|
|
35
|
+
export declare class NoStatePathsInTemplatesConfig extends BaseRuleConfig {
|
|
36
|
+
mode?: ModifiedCodeMode;
|
|
37
|
+
disableAllowed?: boolean;
|
|
38
|
+
templateDirs?: string[];
|
|
39
|
+
bannedPathPrefixes?: string[];
|
|
40
|
+
static readonly SCHEMA: SchemaShape<NoStatePathsInTemplatesConfig>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoStatePathsInTemplatesConfig = exports.DEFAULT_BANNED_STATE_PATH_PREFIXES = exports.DEFAULT_TEMPLATE_DIRS = void 0;
|
|
4
|
+
const rules_sdk_1 = require("@webpieces/rules-sdk");
|
|
5
|
+
const rules_sdk_2 = require("@webpieces/rules-sdk");
|
|
6
|
+
/**
|
|
7
|
+
* The template dirs `no-state-paths-in-templates` looks at when a repo has not said otherwise:
|
|
8
|
+
* webpieces' own instruct-ai templates, which are the generated docs the rule was written for.
|
|
9
|
+
*
|
|
10
|
+
* A consumer repo that generates AI-facing docs from its own templates points `templateDirs` at them;
|
|
11
|
+
* a repo that generates none matches no files and the rule is a no-op. Seeded rather than left empty
|
|
12
|
+
* so the rule arrives doing the job it exists for instead of waiting to be discovered.
|
|
13
|
+
*/
|
|
14
|
+
exports.DEFAULT_TEMPLATE_DIRS = ['packages/tooling/rules-config/templates'];
|
|
15
|
+
/**
|
|
16
|
+
* The path prefixes that must never be RESTATED in a generated doc, only computed.
|
|
17
|
+
*
|
|
18
|
+
* `.webpieces/` is the whole webpieces state tree, and every path under it is per-tree: a linked
|
|
19
|
+
* worktree's state lives at `<primary>/.webpieces/worktrees/<name>/…`, so the relative spelling names
|
|
20
|
+
* a file that does not exist there.
|
|
21
|
+
*/
|
|
22
|
+
exports.DEFAULT_BANNED_STATE_PATH_PREFIXES = ['.webpieces/'];
|
|
23
|
+
/**
|
|
24
|
+
* Bans a hard-coded state path inside a GENERATED-doc template.
|
|
25
|
+
*
|
|
26
|
+
* The incident: `webpieces.git-workflow.md` restated `.webpieces/logs/branch-mutations.log`. That log
|
|
27
|
+
* is per-worktree, so the doc — regenerated into every governed repo and handed to an agent by
|
|
28
|
+
* absolute path as instruction — named a file that does not exist in half the trees that read it.
|
|
29
|
+
* Every one of these paths already has a resolver; the template engine already substitutes. The rule
|
|
30
|
+
* makes "restate it" the thing that fails and "render `{{PLACEHOLDER}}` from the resolver" the thing
|
|
31
|
+
* that passes.
|
|
32
|
+
*
|
|
33
|
+
* Diff-scoped like every other code rule, so the docs whose SUBJECT is the layout (they explain both
|
|
34
|
+
* rows on purpose) are not retroactively flooded — the rule bites when a template is next edited.
|
|
35
|
+
* A doc that genuinely has to print the literal says so out loud:
|
|
36
|
+
* `<!-- webpieces-disable no-state-paths-in-templates -- this table IS the layout -->`.
|
|
37
|
+
*/
|
|
38
|
+
class NoStatePathsInTemplatesConfig extends rules_sdk_1.BaseRuleConfig {
|
|
39
|
+
disableAllowed;
|
|
40
|
+
templateDirs;
|
|
41
|
+
bannedPathPrefixes;
|
|
42
|
+
static SCHEMA = {
|
|
43
|
+
mode: new rules_sdk_1.FieldDef('string', rules_sdk_2.MODIFIED_CODE_MODES),
|
|
44
|
+
disableAllowed: rules_sdk_1.FieldDef.optional('boolean'),
|
|
45
|
+
templateDirs: rules_sdk_1.FieldDef.optional('string[]'),
|
|
46
|
+
bannedPathPrefixes: rules_sdk_1.FieldDef.optional('string[]'),
|
|
47
|
+
...rules_sdk_1.BASE_RULE_SCHEMA,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
exports.NoStatePathsInTemplatesConfig = NoStatePathsInTemplatesConfig;
|
|
51
|
+
//# sourceMappingURL=no-state-paths-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-state-paths-config.js","sourceRoot":"","sources":["../../../../../../packages/tooling/code-rules/src/configs/no-state-paths-config.ts"],"names":[],"mappings":";;;AAAA,oDAA+F;AAC/F,oDAA6E;AAC7E;;;;;;;GAOG;AACU,QAAA,qBAAqB,GAAsB,CAAC,yCAAyC,CAAC,CAAC;AAEpG;;;;;;GAMG;AACU,QAAA,kCAAkC,GAAsB,CAAC,aAAa,CAAC,CAAC;AAErF;;;;;;;;;;;;;;GAcG;AACH,MAAa,6BAA8B,SAAQ,0BAAc;IAE7D,cAAc,CAAW;IACzB,YAAY,CAAY;IACxB,kBAAkB,CAAY;IAE9B,MAAM,CAAU,MAAM,GAA+C;QACjE,IAAI,EAAE,IAAI,oBAAQ,CAAC,QAAQ,EAAE,+BAAmB,CAAC;QACjD,cAAc,EAAE,oBAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC5C,YAAY,EAAE,oBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC3C,kBAAkB,EAAE,oBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;QACjD,GAAG,4BAAgB;KACtB,CAAC;;AAZN,sEAaC","sourcesContent":["import { FieldDef, SchemaShape, BaseRuleConfig, BASE_RULE_SCHEMA } from \"@webpieces/rules-sdk\";\nimport { ModifiedCodeMode, MODIFIED_CODE_MODES } from \"@webpieces/rules-sdk\";\n/**\n * The template dirs `no-state-paths-in-templates` looks at when a repo has not said otherwise:\n * webpieces' own instruct-ai templates, which are the generated docs the rule was written for.\n *\n * A consumer repo that generates AI-facing docs from its own templates points `templateDirs` at them;\n * a repo that generates none matches no files and the rule is a no-op. Seeded rather than left empty\n * so the rule arrives doing the job it exists for instead of waiting to be discovered.\n */\nexport const DEFAULT_TEMPLATE_DIRS: readonly string[] = ['packages/tooling/rules-config/templates'];\n\n/**\n * The path prefixes that must never be RESTATED in a generated doc, only computed.\n *\n * `.webpieces/` is the whole webpieces state tree, and every path under it is per-tree: a linked\n * worktree's state lives at `<primary>/.webpieces/worktrees/<name>/…`, so the relative spelling names\n * a file that does not exist there.\n */\nexport const DEFAULT_BANNED_STATE_PATH_PREFIXES: readonly string[] = ['.webpieces/'];\n\n/**\n * Bans a hard-coded state path inside a GENERATED-doc template.\n *\n * The incident: `webpieces.git-workflow.md` restated `.webpieces/logs/branch-mutations.log`. That log\n * is per-worktree, so the doc — regenerated into every governed repo and handed to an agent by\n * absolute path as instruction — named a file that does not exist in half the trees that read it.\n * Every one of these paths already has a resolver; the template engine already substitutes. The rule\n * makes \"restate it\" the thing that fails and \"render `{{PLACEHOLDER}}` from the resolver\" the thing\n * that passes.\n *\n * Diff-scoped like every other code rule, so the docs whose SUBJECT is the layout (they explain both\n * rows on purpose) are not retroactively flooded — the rule bites when a template is next edited.\n * A doc that genuinely has to print the literal says so out loud:\n * `<!-- webpieces-disable no-state-paths-in-templates -- this table IS the layout -->`.\n */\nexport class NoStatePathsInTemplatesConfig extends BaseRuleConfig {\n declare mode?: ModifiedCodeMode;\n disableAllowed?: boolean;\n templateDirs?: string[];\n bannedPathPrefixes?: string[];\n\n static readonly SCHEMA: SchemaShape<NoStatePathsInTemplatesConfig> = {\n mode: new FieldDef('string', MODIFIED_CODE_MODES),\n disableAllowed: FieldDef.optional('boolean'),\n templateDirs: FieldDef.optional('string[]'),\n bannedPathPrefixes: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SchemaShape, BaseRuleConfig } from "@webpieces/rules-sdk";
|
|
2
|
+
import { ModifiedCodeMode } from "@webpieces/rules-sdk";
|
|
3
|
+
/**
|
|
4
|
+
* `no-utility-types-in-api-lib` (#1026) — in every `.ts` file under `paths`, refuse the TypeScript
|
|
5
|
+
* utility types that turn a contract's field list (or its set of keys) into a type-level computation:
|
|
6
|
+
* `Omit`, `Pick`, `Partial`, `Required`, `Exclude` and `Extract`. Refused wherever a type is written
|
|
7
|
+
* — `interface X extends Omit<…>`, a field type, a type alias, a generic argument.
|
|
8
|
+
*
|
|
9
|
+
* Why the whole family and not `Omit` alone: every one of them makes a reader open a second file and
|
|
10
|
+
* compute the fields (or keys) in their head, none of them can become a DTO class (`class X extends
|
|
11
|
+
* Omit<…>` does not compile — a utility type has no runtime value), and banning `Omit` alone just
|
|
12
|
+
* moves the same computation into `Pick<T, Exclude<keyof T, K>>`. `Record`, `Readonly`, `Array` and
|
|
13
|
+
* friends stay allowed: they do not hide which fields a DTO carries.
|
|
14
|
+
*
|
|
15
|
+
* Every field that decides behaviour is REQUIRED with no default (`.claude/rules/no-rule-defaults.md`):
|
|
16
|
+
* - `mode` — OFF | NEW_AND_MODIFIED_CODE (only changed lines, so existing code is fixed as it is
|
|
17
|
+
* touched) | NEW_AND_MODIFIED_FILES (every occurrence in a changed file) | MODIFIED_PROJECTS /
|
|
18
|
+
* RUN_EVERY_TIME (every occurrence in a touched project / in the repo — #1027).
|
|
19
|
+
* - `paths` — the globs of the API contract libraries this rule judges, e.g. `["libraries/apis/**"]`.
|
|
20
|
+
* An empty list judges nothing.
|
|
21
|
+
*
|
|
22
|
+
* `allowedPaths` exempts whole trees inside `paths`. The per-site escape hatch is
|
|
23
|
+
* `// webpieces-disable no-utility-types-in-api-lib -- <reason>` on the line or the line above.
|
|
24
|
+
*/
|
|
25
|
+
export declare class NoUtilityTypesInApiLibConfig extends BaseRuleConfig {
|
|
26
|
+
mode?: ModifiedCodeMode;
|
|
27
|
+
paths: string[];
|
|
28
|
+
allowedPaths?: string[];
|
|
29
|
+
static readonly SCHEMA: SchemaShape<NoUtilityTypesInApiLibConfig>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoUtilityTypesInApiLibConfig = void 0;
|
|
4
|
+
const rules_sdk_1 = require("@webpieces/rules-sdk");
|
|
5
|
+
const rules_sdk_2 = require("@webpieces/rules-sdk");
|
|
6
|
+
/**
|
|
7
|
+
* `no-utility-types-in-api-lib` (#1026) — in every `.ts` file under `paths`, refuse the TypeScript
|
|
8
|
+
* utility types that turn a contract's field list (or its set of keys) into a type-level computation:
|
|
9
|
+
* `Omit`, `Pick`, `Partial`, `Required`, `Exclude` and `Extract`. Refused wherever a type is written
|
|
10
|
+
* — `interface X extends Omit<…>`, a field type, a type alias, a generic argument.
|
|
11
|
+
*
|
|
12
|
+
* Why the whole family and not `Omit` alone: every one of them makes a reader open a second file and
|
|
13
|
+
* compute the fields (or keys) in their head, none of them can become a DTO class (`class X extends
|
|
14
|
+
* Omit<…>` does not compile — a utility type has no runtime value), and banning `Omit` alone just
|
|
15
|
+
* moves the same computation into `Pick<T, Exclude<keyof T, K>>`. `Record`, `Readonly`, `Array` and
|
|
16
|
+
* friends stay allowed: they do not hide which fields a DTO carries.
|
|
17
|
+
*
|
|
18
|
+
* Every field that decides behaviour is REQUIRED with no default (`.claude/rules/no-rule-defaults.md`):
|
|
19
|
+
* - `mode` — OFF | NEW_AND_MODIFIED_CODE (only changed lines, so existing code is fixed as it is
|
|
20
|
+
* touched) | NEW_AND_MODIFIED_FILES (every occurrence in a changed file) | MODIFIED_PROJECTS /
|
|
21
|
+
* RUN_EVERY_TIME (every occurrence in a touched project / in the repo — #1027).
|
|
22
|
+
* - `paths` — the globs of the API contract libraries this rule judges, e.g. `["libraries/apis/**"]`.
|
|
23
|
+
* An empty list judges nothing.
|
|
24
|
+
*
|
|
25
|
+
* `allowedPaths` exempts whole trees inside `paths`. The per-site escape hatch is
|
|
26
|
+
* `// webpieces-disable no-utility-types-in-api-lib -- <reason>` on the line or the line above.
|
|
27
|
+
*/
|
|
28
|
+
class NoUtilityTypesInApiLibConfig extends rules_sdk_1.BaseRuleConfig {
|
|
29
|
+
paths;
|
|
30
|
+
allowedPaths;
|
|
31
|
+
static SCHEMA = {
|
|
32
|
+
mode: new rules_sdk_1.FieldDef('string', rules_sdk_2.MODIFIED_CODE_MODES),
|
|
33
|
+
paths: new rules_sdk_1.FieldDef('string[]'),
|
|
34
|
+
allowedPaths: rules_sdk_1.FieldDef.optional('string[]'),
|
|
35
|
+
...rules_sdk_1.BASE_RULE_SCHEMA,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
exports.NoUtilityTypesInApiLibConfig = NoUtilityTypesInApiLibConfig;
|
|
39
|
+
//# sourceMappingURL=no-utility-types-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-utility-types-config.js","sourceRoot":"","sources":["../../../../../../packages/tooling/code-rules/src/configs/no-utility-types-config.ts"],"names":[],"mappings":";;;AAAA,oDAA+F;AAC/F,oDAA6E;AAC7E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,4BAA6B,SAAQ,0BAAc;IAE5D,KAAK,CAAY;IACjB,YAAY,CAAY;IAExB,MAAM,CAAU,MAAM,GAA8C;QAChE,IAAI,EAAE,IAAI,oBAAQ,CAAC,QAAQ,EAAE,+BAAmB,CAAC;QACjD,KAAK,EAAE,IAAI,oBAAQ,CAAC,UAAU,CAAC;QAC/B,YAAY,EAAE,oBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC3C,GAAG,4BAAgB;KACtB,CAAC;;AAVN,oEAWC","sourcesContent":["import { FieldDef, SchemaShape, BaseRuleConfig, BASE_RULE_SCHEMA } from \"@webpieces/rules-sdk\";\nimport { ModifiedCodeMode, MODIFIED_CODE_MODES } from \"@webpieces/rules-sdk\";\n/**\n * `no-utility-types-in-api-lib` (#1026) — in every `.ts` file under `paths`, refuse the TypeScript\n * utility types that turn a contract's field list (or its set of keys) into a type-level computation:\n * `Omit`, `Pick`, `Partial`, `Required`, `Exclude` and `Extract`. Refused wherever a type is written\n * — `interface X extends Omit<…>`, a field type, a type alias, a generic argument.\n *\n * Why the whole family and not `Omit` alone: every one of them makes a reader open a second file and\n * compute the fields (or keys) in their head, none of them can become a DTO class (`class X extends\n * Omit<…>` does not compile — a utility type has no runtime value), and banning `Omit` alone just\n * moves the same computation into `Pick<T, Exclude<keyof T, K>>`. `Record`, `Readonly`, `Array` and\n * friends stay allowed: they do not hide which fields a DTO carries.\n *\n * Every field that decides behaviour is REQUIRED with no default (`.claude/rules/no-rule-defaults.md`):\n * - `mode` — OFF | NEW_AND_MODIFIED_CODE (only changed lines, so existing code is fixed as it is\n * touched) | NEW_AND_MODIFIED_FILES (every occurrence in a changed file) | MODIFIED_PROJECTS /\n * RUN_EVERY_TIME (every occurrence in a touched project / in the repo — #1027).\n * - `paths` — the globs of the API contract libraries this rule judges, e.g. `[\"libraries/apis/**\"]`.\n * An empty list judges nothing.\n *\n * `allowedPaths` exempts whole trees inside `paths`. The per-site escape hatch is\n * `// webpieces-disable no-utility-types-in-api-lib -- <reason>` on the line or the line above.\n */\nexport class NoUtilityTypesInApiLibConfig extends BaseRuleConfig {\n declare mode?: ModifiedCodeMode;\n paths!: string[];\n allowedPaths?: string[];\n\n static readonly SCHEMA: SchemaShape<NoUtilityTypesInApiLibConfig> = {\n mode: new FieldDef('string', MODIFIED_CODE_MODES),\n paths: new FieldDef('string[]'),\n allowedPaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { SchemaShape, BaseRuleConfig } from "@webpieces/rules-sdk";
|
|
2
|
+
import { ModifiedCodeMode } from "@webpieces/rules-sdk";
|
|
3
|
+
/**
|
|
4
|
+
* One `required-type-suffix` entry: the path globs it covers and the suffixes a type exported from a
|
|
5
|
+
* file under them may end in. Data-only.
|
|
6
|
+
*/
|
|
7
|
+
export declare class RequiredTypeSuffixEntry {
|
|
8
|
+
/** Workspace-relative globs, e.g. `["libraries/apis/internal/**"]`. Non-empty. */
|
|
9
|
+
paths: string[];
|
|
10
|
+
/** Case-sensitive name suffixes, e.g. `["Request", "Response", "Event", "Dto", "Api"]`. Non-empty. */
|
|
11
|
+
suffixes: string[];
|
|
12
|
+
static readonly SCHEMA: SchemaShape<RequiredTypeSuffixEntry>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* `required-type-suffix` (#1037) — every EXPORTED `interface`, `class` (abstract too), `enum` and `type`
|
|
16
|
+
* alias in a non-test `.ts` file under an entry's `paths` must end in one of that entry's `suffixes`
|
|
17
|
+
* (plain, case-sensitive `endsWith`; the suffix alone is not a name). Why: the suffix tells a reader which
|
|
18
|
+
* LAYER a type belongs to — a `…Dto` is on the wire, a `…Fs` is a Firestore document — where an
|
|
19
|
+
* unsuffixed name reads the same as a server-internal or vendor type.
|
|
20
|
+
*
|
|
21
|
+
* Every field that decides behaviour is REQUIRED with no default (`.claude/rules/no-rule-defaults.md`):
|
|
22
|
+
* - `mode` — OFF | NEW_AND_MODIFIED_CODE (only a type whose declaration line is new or changed — a new or
|
|
23
|
+
* renamed type — so legacy names are grandfathered) | NEW_AND_MODIFIED_FILES (every exported type in a
|
|
24
|
+
* changed file) | MODIFIED_PROJECTS / RUN_EVERY_TIME (every exported type in each touched project / the
|
|
25
|
+
* whole repo — #1027).
|
|
26
|
+
* - `entries` — non-empty; each entry has non-empty `paths` and `suffixes`. For example:
|
|
27
|
+
*
|
|
28
|
+
* "entries": [
|
|
29
|
+
* { "paths": ["libraries/apis/internal/**"], "suffixes": ["Request", "Response", "Event", "Dto", "Api"] },
|
|
30
|
+
* { "paths": ["libraries/browser-node/fs-*-model/**"], "suffixes": ["Fs"] }
|
|
31
|
+
* ]
|
|
32
|
+
*
|
|
33
|
+
* OVERLAP — the FIRST MATCH in `entries` order wins; suffixes are never unioned. A file is governed by
|
|
34
|
+
* exactly one entry: the entries are read top to bottom, and the first one with a glob matching the file
|
|
35
|
+
* decides its suffixes. ORDER MATTERS: a narrower entry must be listed BEFORE a broader one. With
|
|
36
|
+
* `libraries/apis/internal/**` listed above `libraries/apis/**`, the narrower entry governs
|
|
37
|
+
* `libraries/apis/internal/x/src/A.ts`; listed below it, the broader entry governs that file and the
|
|
38
|
+
* narrower one never applies there. A failure names the governing entry's glob, so a reader can see
|
|
39
|
+
* which entry won.
|
|
40
|
+
*
|
|
41
|
+
* `allowedPaths` exempts whole trees inside `paths`. The per-site escape hatch is
|
|
42
|
+
* `// webpieces-disable required-type-suffix -- <reason>` on the declaration's line or the line above.
|
|
43
|
+
*/
|
|
44
|
+
export declare class RequiredTypeSuffixConfig extends BaseRuleConfig {
|
|
45
|
+
mode?: ModifiedCodeMode;
|
|
46
|
+
entries: RequiredTypeSuffixEntry[];
|
|
47
|
+
allowedPaths?: string[];
|
|
48
|
+
static readonly SCHEMA: SchemaShape<RequiredTypeSuffixConfig>;
|
|
49
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RequiredTypeSuffixConfig = exports.RequiredTypeSuffixEntry = void 0;
|
|
4
|
+
const rules_sdk_1 = require("@webpieces/rules-sdk");
|
|
5
|
+
const rules_sdk_2 = require("@webpieces/rules-sdk");
|
|
6
|
+
/**
|
|
7
|
+
* One `required-type-suffix` entry: the path globs it covers and the suffixes a type exported from a
|
|
8
|
+
* file under them may end in. Data-only.
|
|
9
|
+
*/
|
|
10
|
+
class RequiredTypeSuffixEntry {
|
|
11
|
+
/** Workspace-relative globs, e.g. `["libraries/apis/internal/**"]`. Non-empty. */
|
|
12
|
+
paths;
|
|
13
|
+
/** Case-sensitive name suffixes, e.g. `["Request", "Response", "Event", "Dto", "Api"]`. Non-empty. */
|
|
14
|
+
suffixes;
|
|
15
|
+
static SCHEMA = {
|
|
16
|
+
paths: rules_sdk_1.FieldDef.nonEmptyStrings(),
|
|
17
|
+
suffixes: rules_sdk_1.FieldDef.nonEmptyStrings(),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
exports.RequiredTypeSuffixEntry = RequiredTypeSuffixEntry;
|
|
21
|
+
/**
|
|
22
|
+
* `required-type-suffix` (#1037) — every EXPORTED `interface`, `class` (abstract too), `enum` and `type`
|
|
23
|
+
* alias in a non-test `.ts` file under an entry's `paths` must end in one of that entry's `suffixes`
|
|
24
|
+
* (plain, case-sensitive `endsWith`; the suffix alone is not a name). Why: the suffix tells a reader which
|
|
25
|
+
* LAYER a type belongs to — a `…Dto` is on the wire, a `…Fs` is a Firestore document — where an
|
|
26
|
+
* unsuffixed name reads the same as a server-internal or vendor type.
|
|
27
|
+
*
|
|
28
|
+
* Every field that decides behaviour is REQUIRED with no default (`.claude/rules/no-rule-defaults.md`):
|
|
29
|
+
* - `mode` — OFF | NEW_AND_MODIFIED_CODE (only a type whose declaration line is new or changed — a new or
|
|
30
|
+
* renamed type — so legacy names are grandfathered) | NEW_AND_MODIFIED_FILES (every exported type in a
|
|
31
|
+
* changed file) | MODIFIED_PROJECTS / RUN_EVERY_TIME (every exported type in each touched project / the
|
|
32
|
+
* whole repo — #1027).
|
|
33
|
+
* - `entries` — non-empty; each entry has non-empty `paths` and `suffixes`. For example:
|
|
34
|
+
*
|
|
35
|
+
* "entries": [
|
|
36
|
+
* { "paths": ["libraries/apis/internal/**"], "suffixes": ["Request", "Response", "Event", "Dto", "Api"] },
|
|
37
|
+
* { "paths": ["libraries/browser-node/fs-*-model/**"], "suffixes": ["Fs"] }
|
|
38
|
+
* ]
|
|
39
|
+
*
|
|
40
|
+
* OVERLAP — the FIRST MATCH in `entries` order wins; suffixes are never unioned. A file is governed by
|
|
41
|
+
* exactly one entry: the entries are read top to bottom, and the first one with a glob matching the file
|
|
42
|
+
* decides its suffixes. ORDER MATTERS: a narrower entry must be listed BEFORE a broader one. With
|
|
43
|
+
* `libraries/apis/internal/**` listed above `libraries/apis/**`, the narrower entry governs
|
|
44
|
+
* `libraries/apis/internal/x/src/A.ts`; listed below it, the broader entry governs that file and the
|
|
45
|
+
* narrower one never applies there. A failure names the governing entry's glob, so a reader can see
|
|
46
|
+
* which entry won.
|
|
47
|
+
*
|
|
48
|
+
* `allowedPaths` exempts whole trees inside `paths`. The per-site escape hatch is
|
|
49
|
+
* `// webpieces-disable required-type-suffix -- <reason>` on the declaration's line or the line above.
|
|
50
|
+
*/
|
|
51
|
+
class RequiredTypeSuffixConfig extends rules_sdk_1.BaseRuleConfig {
|
|
52
|
+
entries;
|
|
53
|
+
allowedPaths;
|
|
54
|
+
static SCHEMA = {
|
|
55
|
+
mode: new rules_sdk_1.FieldDef('string', rules_sdk_2.MODIFIED_CODE_MODES),
|
|
56
|
+
entries: rules_sdk_1.FieldDef.nonEmptyObjects(RequiredTypeSuffixEntry.SCHEMA),
|
|
57
|
+
allowedPaths: rules_sdk_1.FieldDef.optional('string[]'),
|
|
58
|
+
...rules_sdk_1.BASE_RULE_SCHEMA,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
exports.RequiredTypeSuffixConfig = RequiredTypeSuffixConfig;
|
|
62
|
+
//# sourceMappingURL=required-type-suffix-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"required-type-suffix-config.js","sourceRoot":"","sources":["../../../../../../packages/tooling/code-rules/src/configs/required-type-suffix-config.ts"],"names":[],"mappings":";;;AAAA,oDAA+F;AAC/F,oDAA6E;AAC7E;;;GAGG;AACH,MAAa,uBAAuB;IAChC,kFAAkF;IAClF,KAAK,CAAY;IACjB,sGAAsG;IACtG,QAAQ,CAAY;IAEpB,MAAM,CAAU,MAAM,GAAyC;QAC3D,KAAK,EAAE,oBAAQ,CAAC,eAAe,EAAE;QACjC,QAAQ,EAAE,oBAAQ,CAAC,eAAe,EAAE;KACvC,CAAC;;AATN,0DAUC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAa,wBAAyB,SAAQ,0BAAc;IAExD,OAAO,CAA6B;IACpC,YAAY,CAAY;IAExB,MAAM,CAAU,MAAM,GAA0C;QAC5D,IAAI,EAAE,IAAI,oBAAQ,CAAC,QAAQ,EAAE,+BAAmB,CAAC;QACjD,OAAO,EAAE,oBAAQ,CAAC,eAAe,CAAC,uBAAuB,CAAC,MAAM,CAAC;QACjE,YAAY,EAAE,oBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC3C,GAAG,4BAAgB;KACtB,CAAC;;AAVN,4DAWC","sourcesContent":["import { FieldDef, SchemaShape, BaseRuleConfig, BASE_RULE_SCHEMA } from \"@webpieces/rules-sdk\";\nimport { ModifiedCodeMode, MODIFIED_CODE_MODES } from \"@webpieces/rules-sdk\";\n/**\n * One `required-type-suffix` entry: the path globs it covers and the suffixes a type exported from a\n * file under them may end in. Data-only.\n */\nexport class RequiredTypeSuffixEntry {\n /** Workspace-relative globs, e.g. `[\"libraries/apis/internal/**\"]`. Non-empty. */\n paths!: string[];\n /** Case-sensitive name suffixes, e.g. `[\"Request\", \"Response\", \"Event\", \"Dto\", \"Api\"]`. Non-empty. */\n suffixes!: string[];\n\n static readonly SCHEMA: SchemaShape<RequiredTypeSuffixEntry> = {\n paths: FieldDef.nonEmptyStrings(),\n suffixes: FieldDef.nonEmptyStrings(),\n };\n}\n\n/**\n * `required-type-suffix` (#1037) — every EXPORTED `interface`, `class` (abstract too), `enum` and `type`\n * alias in a non-test `.ts` file under an entry's `paths` must end in one of that entry's `suffixes`\n * (plain, case-sensitive `endsWith`; the suffix alone is not a name). Why: the suffix tells a reader which\n * LAYER a type belongs to — a `…Dto` is on the wire, a `…Fs` is a Firestore document — where an\n * unsuffixed name reads the same as a server-internal or vendor type.\n *\n * Every field that decides behaviour is REQUIRED with no default (`.claude/rules/no-rule-defaults.md`):\n * - `mode` — OFF | NEW_AND_MODIFIED_CODE (only a type whose declaration line is new or changed — a new or\n * renamed type — so legacy names are grandfathered) | NEW_AND_MODIFIED_FILES (every exported type in a\n * changed file) | MODIFIED_PROJECTS / RUN_EVERY_TIME (every exported type in each touched project / the\n * whole repo — #1027).\n * - `entries` — non-empty; each entry has non-empty `paths` and `suffixes`. For example:\n *\n * \"entries\": [\n * { \"paths\": [\"libraries/apis/internal/**\"], \"suffixes\": [\"Request\", \"Response\", \"Event\", \"Dto\", \"Api\"] },\n * { \"paths\": [\"libraries/browser-node/fs-*-model/**\"], \"suffixes\": [\"Fs\"] }\n * ]\n *\n * OVERLAP — the FIRST MATCH in `entries` order wins; suffixes are never unioned. A file is governed by\n * exactly one entry: the entries are read top to bottom, and the first one with a glob matching the file\n * decides its suffixes. ORDER MATTERS: a narrower entry must be listed BEFORE a broader one. With\n * `libraries/apis/internal/**` listed above `libraries/apis/**`, the narrower entry governs\n * `libraries/apis/internal/x/src/A.ts`; listed below it, the broader entry governs that file and the\n * narrower one never applies there. A failure names the governing entry's glob, so a reader can see\n * which entry won.\n *\n * `allowedPaths` exempts whole trees inside `paths`. The per-site escape hatch is\n * `// webpieces-disable required-type-suffix -- <reason>` on the declaration's line or the line above.\n */\nexport class RequiredTypeSuffixConfig extends BaseRuleConfig {\n declare mode?: ModifiedCodeMode;\n entries!: RequiredTypeSuffixEntry[];\n allowedPaths?: string[];\n\n static readonly SCHEMA: SchemaShape<RequiredTypeSuffixConfig> = {\n mode: new FieldDef('string', MODIFIED_CODE_MODES),\n entries: FieldDef.nonEmptyObjects(RequiredTypeSuffixEntry.SCHEMA),\n allowedPaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n"]}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { FileLimitMode, ModifiedCodeMode } from "@webpieces/rules-sdk";
|
|
2
|
+
import { BaseRuleConfig } from "@webpieces/rules-sdk";
|
|
3
|
+
import { SchemaShape } from "@webpieces/rules-sdk";
|
|
4
|
+
export declare const METHOD_LIMIT_MODES: readonly ["OFF", "NEW_METHODS", "NEW_AND_MODIFIED_METHODS", "NEW_AND_MODIFIED_FILES"];
|
|
5
|
+
export type MethodLimitMode = typeof METHOD_LIMIT_MODES[number];
|
|
6
|
+
export declare const RETURN_TYPE_MODES: readonly ["OFF", "NEW_METHODS", "NEW_AND_MODIFIED_METHODS", "NEW_AND_MODIFIED_FILES"];
|
|
7
|
+
export type ReturnTypeMode = typeof RETURN_TYPE_MODES[number];
|
|
8
|
+
export declare const INLINE_TYPE_MODES: readonly ["OFF", "NEW_METHODS", "NEW_AND_MODIFIED_METHODS", "NEW_AND_MODIFIED_FILES"];
|
|
9
|
+
export type InlineTypeMode = typeof INLINE_TYPE_MODES[number];
|
|
10
|
+
export declare const PROJECT_MODES: readonly ["OFF", "MODIFIED_PROJECTS"];
|
|
11
|
+
export type ProjectMode = typeof PROJECT_MODES[number];
|
|
12
|
+
export declare const PRISMA_DTOS_MODES: readonly ["OFF", "MODIFIED_CLASS", "NEW_AND_MODIFIED_FILES"];
|
|
13
|
+
export type PrismaValidateDtosMode = typeof PRISMA_DTOS_MODES[number];
|
|
14
|
+
export declare const PRISMA_CONVERTER_MODES: readonly ["OFF", "NEW_AND_MODIFIED_METHODS", "NEW_AND_MODIFIED_FILES"];
|
|
15
|
+
export type PrismaConverterMode = typeof PRISMA_CONVERTER_MODES[number];
|
|
16
|
+
export declare const DIRECT_API_RESOLVER_MODES: readonly ["OFF", "NEW_AND_MODIFIED_CODE", "NEW_AND_MODIFIED_METHODS", "NEW_AND_MODIFIED_FILES"];
|
|
17
|
+
export type DirectApiResolverMode = typeof DIRECT_API_RESOLVER_MODES[number];
|
|
18
|
+
export declare class MaxMethodLinesConfig extends BaseRuleConfig {
|
|
19
|
+
mode?: MethodLimitMode;
|
|
20
|
+
limit?: number;
|
|
21
|
+
disableAllowed?: boolean;
|
|
22
|
+
static readonly SCHEMA: SchemaShape<MaxMethodLinesConfig>;
|
|
23
|
+
}
|
|
24
|
+
export declare class MaxFileLinesConfig extends BaseRuleConfig {
|
|
25
|
+
mode?: FileLimitMode;
|
|
26
|
+
limit?: number;
|
|
27
|
+
disableAllowed?: boolean;
|
|
28
|
+
allowedPaths?: string[];
|
|
29
|
+
static readonly SCHEMA: SchemaShape<MaxFileLinesConfig>;
|
|
30
|
+
}
|
|
31
|
+
export declare class RequireReturnTypeConfig extends BaseRuleConfig {
|
|
32
|
+
mode?: ReturnTypeMode;
|
|
33
|
+
disableAllowed?: boolean;
|
|
34
|
+
static readonly SCHEMA: SchemaShape<RequireReturnTypeConfig>;
|
|
35
|
+
}
|
|
36
|
+
export declare class NoInlineTypeLiteralsConfig extends BaseRuleConfig {
|
|
37
|
+
mode?: InlineTypeMode;
|
|
38
|
+
disableAllowed?: boolean;
|
|
39
|
+
static readonly SCHEMA: SchemaShape<NoInlineTypeLiteralsConfig>;
|
|
40
|
+
}
|
|
41
|
+
export declare class NoAnyUnknownConfig extends BaseRuleConfig {
|
|
42
|
+
mode?: ModifiedCodeMode;
|
|
43
|
+
disableAllowed?: boolean;
|
|
44
|
+
static readonly SCHEMA: SchemaShape<NoAnyUnknownConfig>;
|
|
45
|
+
}
|
|
46
|
+
export declare class NoImplicitAnyConfig extends BaseRuleConfig {
|
|
47
|
+
mode?: ModifiedCodeMode;
|
|
48
|
+
disableAllowed?: boolean;
|
|
49
|
+
static readonly SCHEMA: SchemaShape<NoImplicitAnyConfig>;
|
|
50
|
+
}
|
|
51
|
+
export declare class PrismaValidateDtosConfig extends BaseRuleConfig {
|
|
52
|
+
mode?: PrismaValidateDtosMode;
|
|
53
|
+
disableAllowed?: boolean;
|
|
54
|
+
prismaSchemaPath?: string;
|
|
55
|
+
dtoSourcePaths?: string[];
|
|
56
|
+
static readonly SCHEMA: SchemaShape<PrismaValidateDtosConfig>;
|
|
57
|
+
}
|
|
58
|
+
export declare class PrismaConverterConfig extends BaseRuleConfig {
|
|
59
|
+
mode?: PrismaConverterMode;
|
|
60
|
+
disableAllowed?: boolean;
|
|
61
|
+
schemaPath?: string;
|
|
62
|
+
convertersPaths?: string[];
|
|
63
|
+
enforcePaths?: string[];
|
|
64
|
+
static readonly SCHEMA: SchemaShape<PrismaConverterConfig>;
|
|
65
|
+
}
|
|
66
|
+
export declare class NoDestructureConfig extends BaseRuleConfig {
|
|
67
|
+
mode?: ModifiedCodeMode;
|
|
68
|
+
allowTopLevel?: boolean;
|
|
69
|
+
disableAllowed?: boolean;
|
|
70
|
+
allowedPaths?: string[];
|
|
71
|
+
static readonly SCHEMA: SchemaShape<NoDestructureConfig>;
|
|
72
|
+
}
|
|
73
|
+
export declare class NoUnmanagedExceptionsConfig extends BaseRuleConfig {
|
|
74
|
+
mode?: ModifiedCodeMode;
|
|
75
|
+
disableAllowed?: boolean;
|
|
76
|
+
static readonly SCHEMA: SchemaShape<NoUnmanagedExceptionsConfig>;
|
|
77
|
+
}
|
|
78
|
+
export declare class CatchErrorPatternConfig extends BaseRuleConfig {
|
|
79
|
+
mode?: ModifiedCodeMode;
|
|
80
|
+
disableAllowed?: boolean;
|
|
81
|
+
static readonly SCHEMA: SchemaShape<CatchErrorPatternConfig>;
|
|
82
|
+
}
|
|
83
|
+
export declare class AngularNoDirectApiInResolverConfig extends BaseRuleConfig {
|
|
84
|
+
mode?: DirectApiResolverMode;
|
|
85
|
+
disableAllowed?: boolean;
|
|
86
|
+
enforcePaths?: string[];
|
|
87
|
+
static readonly SCHEMA: SchemaShape<AngularNoDirectApiInResolverConfig>;
|
|
88
|
+
}
|
|
89
|
+
export declare class NoCustomCssConfig extends BaseRuleConfig {
|
|
90
|
+
mode?: ModifiedCodeMode;
|
|
91
|
+
disableAllowed?: boolean;
|
|
92
|
+
allowGlobs?: string[];
|
|
93
|
+
static readonly SCHEMA: SchemaShape<NoCustomCssConfig>;
|
|
94
|
+
}
|
|
95
|
+
export declare class NoSymbolDiTokensConfig extends BaseRuleConfig {
|
|
96
|
+
mode?: ModifiedCodeMode;
|
|
97
|
+
disableAllowed?: boolean;
|
|
98
|
+
allowedPaths?: string[];
|
|
99
|
+
static readonly SCHEMA: SchemaShape<NoSymbolDiTokensConfig>;
|
|
100
|
+
}
|
|
101
|
+
export declare class NoProcessExitOutsideMainConfig extends BaseRuleConfig {
|
|
102
|
+
mode?: ModifiedCodeMode;
|
|
103
|
+
disableAllowed?: boolean;
|
|
104
|
+
static readonly SCHEMA: SchemaShape<NoProcessExitOutsideMainConfig>;
|
|
105
|
+
}
|
|
106
|
+
export declare class NoFunctionOutsideClassConfig extends BaseRuleConfig {
|
|
107
|
+
mode?: ModifiedCodeMode;
|
|
108
|
+
disableAllowed?: boolean;
|
|
109
|
+
allowedPaths?: string[];
|
|
110
|
+
static readonly SCHEMA: SchemaShape<NoFunctionOutsideClassConfig>;
|
|
111
|
+
}
|
|
112
|
+
export declare class InjectAnnotationNotNeededForConcreteClassConfig extends BaseRuleConfig {
|
|
113
|
+
mode?: ModifiedCodeMode;
|
|
114
|
+
disableAllowed?: boolean;
|
|
115
|
+
allowedPaths?: string[];
|
|
116
|
+
static readonly SCHEMA: SchemaShape<InjectAnnotationNotNeededForConcreteClassConfig>;
|
|
117
|
+
}
|
|
118
|
+
export declare class FrameworkTagConfig extends BaseRuleConfig {
|
|
119
|
+
mode?: ProjectMode;
|
|
120
|
+
knownTypes?: string[];
|
|
121
|
+
static readonly SCHEMA: SchemaShape<FrameworkTagConfig>;
|
|
122
|
+
}
|
|
123
|
+
export declare class RoleTagConfig extends BaseRuleConfig {
|
|
124
|
+
mode?: ProjectMode;
|
|
125
|
+
knownTypes?: string[];
|
|
126
|
+
static readonly SCHEMA: SchemaShape<RoleTagConfig>;
|
|
127
|
+
}
|
|
128
|
+
export declare class EnsureWeAreSecureConfig extends BaseRuleConfig {
|
|
129
|
+
mode?: ProjectMode;
|
|
130
|
+
static readonly SCHEMA: SchemaShape<EnsureWeAreSecureConfig>;
|
|
131
|
+
}
|