no-mistakes 0.99.0 → 0.101.0

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.
@@ -28,6 +28,7 @@ export interface CheckReport {
28
28
  * Omitted when zero. Not a failure and not part of `warnings`.
29
29
  */
30
30
  unprovenMemberQuerySql?: number;
31
+ /** Non-failing advice, including default unused/invalid disable-directive diagnostics. */
31
32
  advisories: RuleFinding[];
32
33
  /** Present only when `includeSqlVerdicts` is requested, including an empty array. */
33
34
  sqlVerdicts?: SqlObligationVerdict[];
@@ -0,0 +1,25 @@
1
+ import type { Relationship } from "./traversal-types";
2
+
3
+ /** File-target allowances applied only to matching selected origin files. */
4
+ export interface ForbiddenDependencyException {
5
+ /** Exact files, directories, or repository-relative globs selecting origins. */
6
+ roots: string[];
7
+ /** Repository-relative file globs; these do not stop dependency traversal. */
8
+ allowedFiles: string[];
9
+ }
10
+
11
+ /** Options for a `forbidden-dependencies` rule application in the config file. */
12
+ export interface ForbiddenDependenciesOptions {
13
+ /** Exact files, directories, or repository-relative globs selecting origins. */
14
+ roots: string[];
15
+ /** Matching origins are removed without pruning dependency traversal. */
16
+ excludeRoots?: string[];
17
+ /** Package or module-specifier globs. */
18
+ forbiddenModules?: string[];
19
+ /** Repository-relative file globs. */
20
+ forbiddenFiles?: string[];
21
+ /** Relationship filters; omission follows all relationships. */
22
+ relationships?: Relationship[];
23
+ /** Matching exceptions union their file allowances for each selected origin. */
24
+ exceptions?: ForbiddenDependencyException[];
25
+ }
@@ -0,0 +1,26 @@
1
+ /** Comment directives selectable by the forbidden-lint-suppressions check. */
2
+ export type ForbiddenLintSuppressionDirective =
3
+ | "eslint-disable"
4
+ | "eslint-disable-line"
5
+ | "eslint-disable-next-line"
6
+ | "oxlint-disable"
7
+ | "oxlint-disable-line"
8
+ | "oxlint-disable-next-line"
9
+ | "@ts-ignore"
10
+ | "@ts-expect-error";
11
+
12
+ /** Options for the opt-in forbidden-lint-suppressions repository check. */
13
+ export interface ForbiddenLintSuppressionsOptions {
14
+ /** Required, nonempty repository-relative file globs; intersect the application scope. */
15
+ files: string[];
16
+ /** Exact forbidden lint rule identifiers. Default: []. */
17
+ ruleIds?: string[];
18
+ /** Literal forbidden lint rule identifier prefixes. Default: []. */
19
+ rulePrefixes?: string[];
20
+ /** Defaults to all six eslint-disable/oxlint-disable forms; TypeScript directives are opt-in. */
21
+ directives?: ForbiddenLintSuppressionDirective[];
22
+ /** Also reject selected lint directives with no rule identifiers. Default: false. */
23
+ banBlanketDisable?: boolean;
24
+ /** Custom diagnostic explanation for agents. */
25
+ message?: string;
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "no-mistakes",
3
- "version": "0.99.0",
3
+ "version": "0.101.0",
4
4
  "description": "Deterministic impact maps, test plans, Playwright coverage, and repository checks for coding agents",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -65,9 +65,9 @@
65
65
  }
66
66
  },
67
67
  "optionalDependencies": {
68
- "no-mistakes-darwin-arm64": "0.99.0",
69
- "no-mistakes-linux-arm64-gnu": "0.99.0",
70
- "no-mistakes-linux-x64-gnu": "0.99.0",
71
- "no-mistakes-win32-x64-msvc": "0.99.0"
68
+ "no-mistakes-darwin-arm64": "0.101.0",
69
+ "no-mistakes-linux-arm64-gnu": "0.101.0",
70
+ "no-mistakes-linux-x64-gnu": "0.101.0",
71
+ "no-mistakes-win32-x64-msvc": "0.101.0"
72
72
  }
73
73
  }
@@ -0,0 +1,29 @@
1
+ /** An intentional exception to `postgres-json-relation-ids`. */
2
+ export interface PostgresJsonRelationIdsAllowEntry {
3
+ /** `table:<name>` or `column:<table>.<column>`. */
4
+ object: string;
5
+ /** Why this stored identifier does not need a same-row foreign key. */
6
+ reason: string;
7
+ }
8
+
9
+ /** Options for the advisory `postgres-json-relation-ids` check rule. */
10
+ export interface PostgresJsonRelationIdsOptions {
11
+ /** Required when `keyColumnMap` or `fingerprintNamePattern` is configured. */
12
+ schemaCatalogPath?: string;
13
+ /** Regex for top-level JSON object keys that look like row identifiers; unset disables this check. */
14
+ idKeyPattern?: string;
15
+ /** Maps matching JSON keys to candidate same-row foreign-key columns. */
16
+ keyColumnMap?: Record<string, string>;
17
+ /** Regex for unique `bytea` or `text` fingerprint column names; unset disables this check. */
18
+ fingerprintNamePattern?: string;
19
+ /** Explicit exceptions, each with a nonempty reason. */
20
+ allow?: PostgresJsonRelationIdsAllowEntry[];
21
+ include?: string[];
22
+ exclude?: string[];
23
+ sqlInclude?: string[];
24
+ importSpecifier?: string;
25
+ executorNames?: string[];
26
+ executorFactoryNames?: string[];
27
+ executorTypeNames?: string[];
28
+ trustedSqlTags?: { module: string; name: string }[];
29
+ }
@@ -0,0 +1,17 @@
1
+ import type { Unanalyzable } from "./traversal-types";
2
+
3
+ /** Configuration for the `postgres-no-test-state-mutation` check rule. */
4
+ export interface PostgresNoTestStateMutationOptions {
5
+ /** Explicit test entry globs. The rule has no inferred test convention. */
6
+ testGlobs: string[];
7
+ /** Explicit helper module globs included alongside test entries. */
8
+ helperRoots?: string[];
9
+ importSpecifier?: string;
10
+ executorNames?: string[];
11
+ executorFactoryNames?: string[];
12
+ executorTypeNames?: string[];
13
+ trustedSqlTags?: { module: string; name: string }[];
14
+ unanalyzable?: Unanalyzable;
15
+ /** Legacy spelling; `fail` is accepted as `report`. */
16
+ unanalyzableSql?: "fail" | "ignore" | "advise";
17
+ }
@@ -0,0 +1,13 @@
1
+ import type { Unanalyzable } from "./traversal-types";
2
+
3
+ /** Explicit scope for the opt-in production-exports-only-used-by-tests rule. */
4
+ export interface ProductionExportsOnlyUsedByTestsOptions {
5
+ /** Required production directories or file paths, relative to the root. */
6
+ productionRoots: string[];
7
+ /** Explicit test-file globs. At least one test glob or helper root is required. */
8
+ testGlobs?: string[];
9
+ /** Explicit test-only helper directories or files; no names are inferred. */
10
+ testHelperRoots?: string[];
11
+ /** Uncertain symbol consumers follow the shared policy; default: report. */
12
+ unanalyzable?: Unanalyzable;
13
+ }
@@ -14,7 +14,9 @@ export function assertTimeoutConfig(config, maximum = 30_000) {
14
14
  }
15
15
  /** Preserve SDK option/property semantics while capturing one validated deadline. */
16
16
  export function snapshotTimeoutOptions(options, label, maximum = 30_000, nullInherits = false) {
17
- // Vitest copies registration options with object spread, ignoring inherited/hidden keys.
17
+ // Vitest 5.0.5 assignDefined copies enumerable keys with for-in, including
18
+ // inherited ones. Non-enumerable keys stay unread. Own enumerable timeouts are
19
+ // validated here; an inherited timeout is checked when the task timeout resolves.
18
20
  if (!Object.prototype.propertyIsEnumerable.call(options, "timeout")) return options;
19
21
  const timeout = Reflect.get(options, "timeout");
20
22
  if (timeout !== undefined && (timeout !== null || !nullInherits))
package/types.d.ts CHANGED
@@ -20,6 +20,12 @@ export * from "./postgres-catalog-types";
20
20
  export * from "./planning-impact-artifacts-types";
21
21
  export * from "./declared-payload-types";
22
22
  export type * from "./forbidden-call-types";
23
+ export type * from "./forbidden-dependency-types";
23
24
  export type * from "./postgres-mutable-sql-registry-types";
24
25
  export type * from "./postgres-uuid-predicate-types";
26
+ export type * from "./postgres-test-state-mutation-types";
27
+ export type * from "./postgres-json-relation-ids-types";
25
28
  export type * from "./coverage-assertion-owner-types";
29
+ export type * from "./lint-suppression-types";
30
+
31
+ export type * from "./production-exports-test-only-types";