@opensip-cli/checks-typescript 0.1.9 → 0.1.11
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/README.md +4 -2
- package/dist/__tests__/all-checks-execute.test.d.ts.map +1 -1
- package/dist/__tests__/all-checks-execute.test.js +0 -1
- package/dist/__tests__/all-checks-execute.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-2.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures-2.test.js +0 -1
- package/dist/__tests__/behavior-fixtures-2.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-3.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures-3.test.js +0 -1
- package/dist/__tests__/behavior-fixtures-3.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-4.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures-4.test.js +0 -1
- package/dist/__tests__/behavior-fixtures-4.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-5.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures-5.test.js +0 -1
- package/dist/__tests__/behavior-fixtures-5.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-6.test.js +10 -0
- package/dist/__tests__/behavior-fixtures-6.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures.test.js +2 -4
- package/dist/__tests__/behavior-fixtures.test.js.map +1 -1
- package/dist/__tests__/branch-fixtures-2.test.d.ts.map +1 -1
- package/dist/__tests__/branch-fixtures-2.test.js +0 -1
- package/dist/__tests__/branch-fixtures-2.test.js.map +1 -1
- package/dist/__tests__/branch-fixtures-3.test.d.ts.map +1 -1
- package/dist/__tests__/branch-fixtures-3.test.js +0 -1
- package/dist/__tests__/branch-fixtures-3.test.js.map +1 -1
- package/dist/__tests__/branch-fixtures.test.d.ts.map +1 -1
- package/dist/__tests__/branch-fixtures.test.js +0 -1
- package/dist/__tests__/branch-fixtures.test.js.map +1 -1
- package/dist/checks/architecture/__tests__/live-view-through-cli-live.test.d.ts +2 -0
- package/dist/checks/architecture/__tests__/live-view-through-cli-live.test.d.ts.map +1 -0
- package/dist/checks/architecture/__tests__/live-view-through-cli-live.test.js +13 -0
- package/dist/checks/architecture/__tests__/live-view-through-cli-live.test.js.map +1 -0
- package/dist/checks/architecture/contracts-schema-consistency.d.ts.map +1 -1
- package/dist/checks/architecture/contracts-schema-consistency.js +0 -3
- package/dist/checks/architecture/contracts-schema-consistency.js.map +1 -1
- package/dist/checks/architecture/drizzle-orm-migration-guardrails.d.ts.map +1 -1
- package/dist/checks/architecture/drizzle-orm-migration-guardrails.js +1 -0
- package/dist/checks/architecture/drizzle-orm-migration-guardrails.js.map +1 -1
- package/dist/checks/architecture/index.d.ts +1 -0
- package/dist/checks/architecture/index.d.ts.map +1 -1
- package/dist/checks/architecture/index.js +1 -0
- package/dist/checks/architecture/index.js.map +1 -1
- package/dist/checks/architecture/live-view-through-cli-live.d.ts +8 -0
- package/dist/checks/architecture/live-view-through-cli-live.d.ts.map +1 -0
- package/dist/checks/architecture/live-view-through-cli-live.js +43 -0
- package/dist/checks/architecture/live-view-through-cli-live.js.map +1 -0
- package/dist/checks/architecture/missing-type-exports.d.ts.map +1 -1
- package/dist/checks/architecture/missing-type-exports.js +1 -1
- package/dist/checks/architecture/missing-type-exports.js.map +1 -1
- package/dist/checks/architecture/module-coupling-fan-out.d.ts.map +1 -1
- package/dist/checks/architecture/module-coupling-fan-out.js +6 -2
- package/dist/checks/architecture/module-coupling-fan-out.js.map +1 -1
- package/dist/checks/architecture/no-bootstrap-tool-import.d.ts.map +1 -1
- package/dist/checks/architecture/no-bootstrap-tool-import.js +1 -0
- package/dist/checks/architecture/no-bootstrap-tool-import.js.map +1 -1
- package/dist/checks/architecture/no-run-done-result.d.ts.map +1 -1
- package/dist/checks/architecture/no-run-done-result.js +1 -0
- package/dist/checks/architecture/no-run-done-result.js.map +1 -1
- package/dist/checks/architecture/package-json-exports-field.d.ts.map +1 -1
- package/dist/checks/architecture/package-json-exports-field.js +1 -1
- package/dist/checks/architecture/package-json-exports-field.js.map +1 -1
- package/dist/checks/architecture/phantom-dependency-detection.d.ts.map +1 -1
- package/dist/checks/architecture/phantom-dependency-detection.js +0 -3
- package/dist/checks/architecture/phantom-dependency-detection.js.map +1 -1
- package/dist/checks/architecture/tsconfig-extends-validation.d.ts.map +1 -1
- package/dist/checks/architecture/tsconfig-extends-validation.js +0 -2
- package/dist/checks/architecture/tsconfig-extends-validation.js.map +1 -1
- package/dist/checks/quality/code-structure/__tests__/duplicate-utility-lang-substrate.test.d.ts +5 -0
- package/dist/checks/quality/code-structure/__tests__/duplicate-utility-lang-substrate.test.d.ts.map +1 -0
- package/dist/checks/quality/code-structure/__tests__/duplicate-utility-lang-substrate.test.js +17 -0
- package/dist/checks/quality/code-structure/__tests__/duplicate-utility-lang-substrate.test.js.map +1 -0
- package/dist/checks/quality/code-structure/duplicate-utility-functions-config.d.ts +18 -0
- package/dist/checks/quality/code-structure/duplicate-utility-functions-config.d.ts.map +1 -0
- package/dist/checks/quality/code-structure/duplicate-utility-functions-config.js +36 -0
- package/dist/checks/quality/code-structure/duplicate-utility-functions-config.js.map +1 -0
- package/dist/checks/quality/code-structure/duplicate-utility-functions-helpers.d.ts +15 -0
- package/dist/checks/quality/code-structure/duplicate-utility-functions-helpers.d.ts.map +1 -0
- package/dist/checks/quality/code-structure/duplicate-utility-functions-helpers.js +288 -0
- package/dist/checks/quality/code-structure/duplicate-utility-functions-helpers.js.map +1 -0
- package/dist/checks/quality/code-structure/duplicate-utility-functions.d.ts +1 -26
- package/dist/checks/quality/code-structure/duplicate-utility-functions.d.ts.map +1 -1
- package/dist/checks/quality/code-structure/duplicate-utility-functions.js +3 -407
- package/dist/checks/quality/code-structure/duplicate-utility-functions.js.map +1 -1
- package/dist/checks/quality/data-integrity/__tests__/null-safety-fp.test.js +39 -2
- package/dist/checks/quality/data-integrity/__tests__/null-safety-fp.test.js.map +1 -1
- package/dist/checks/quality/data-integrity/array-validation-detectors.d.ts +17 -0
- package/dist/checks/quality/data-integrity/array-validation-detectors.d.ts.map +1 -0
- package/dist/checks/quality/data-integrity/array-validation-detectors.js +184 -0
- package/dist/checks/quality/data-integrity/array-validation-detectors.js.map +1 -0
- package/dist/checks/quality/data-integrity/array-validation.d.ts +0 -2
- package/dist/checks/quality/data-integrity/array-validation.d.ts.map +1 -1
- package/dist/checks/quality/data-integrity/array-validation.js +2 -360
- package/dist/checks/quality/data-integrity/array-validation.js.map +1 -1
- package/dist/checks/quality/data-integrity/database-schema-validation.d.ts.map +1 -1
- package/dist/checks/quality/data-integrity/database-schema-validation.js +0 -1
- package/dist/checks/quality/data-integrity/database-schema-validation.js.map +1 -1
- package/dist/checks/quality/data-integrity/null-safety-analyze.d.ts +33 -0
- package/dist/checks/quality/data-integrity/null-safety-analyze.d.ts.map +1 -0
- package/dist/checks/quality/data-integrity/null-safety-analyze.js +164 -0
- package/dist/checks/quality/data-integrity/null-safety-analyze.js.map +1 -0
- package/dist/checks/quality/data-integrity/null-safety-config.d.ts +50 -0
- package/dist/checks/quality/data-integrity/null-safety-config.d.ts.map +1 -0
- package/dist/checks/quality/data-integrity/null-safety-config.js +69 -0
- package/dist/checks/quality/data-integrity/null-safety-config.js.map +1 -0
- package/dist/checks/quality/data-integrity/null-safety-heuristics.d.ts +76 -0
- package/dist/checks/quality/data-integrity/null-safety-heuristics.d.ts.map +1 -0
- package/dist/checks/quality/data-integrity/null-safety-heuristics.js +276 -0
- package/dist/checks/quality/data-integrity/null-safety-heuristics.js.map +1 -0
- package/dist/checks/quality/data-integrity/null-safety-prefixes.d.ts +13 -0
- package/dist/checks/quality/data-integrity/null-safety-prefixes.d.ts.map +1 -0
- package/dist/checks/quality/data-integrity/null-safety-prefixes.js +333 -0
- package/dist/checks/quality/data-integrity/null-safety-prefixes.js.map +1 -0
- package/dist/checks/quality/data-integrity/null-safety.d.ts +2 -82
- package/dist/checks/quality/data-integrity/null-safety.d.ts.map +1 -1
- package/dist/checks/quality/data-integrity/null-safety.js +3 -796
- package/dist/checks/quality/data-integrity/null-safety.js.map +1 -1
- package/dist/checks/quality/frontend/test-only-frontend-modules.d.ts.map +1 -1
- package/dist/checks/quality/frontend/test-only-frontend-modules.js +0 -2
- package/dist/checks/quality/frontend/test-only-frontend-modules.js.map +1 -1
- package/dist/checks/quality/linting/typescript-frontend.d.ts.map +1 -1
- package/dist/checks/quality/linting/typescript-frontend.js +1 -0
- package/dist/checks/quality/linting/typescript-frontend.js.map +1 -1
- package/dist/checks/quality/observability/logger-event-name-format.d.ts.map +1 -1
- package/dist/checks/quality/observability/logger-event-name-format.js +0 -1
- package/dist/checks/quality/observability/logger-event-name-format.js.map +1 -1
- package/dist/checks/quality/observability/no-hardcoded-correlation-id.d.ts.map +1 -1
- package/dist/checks/quality/observability/no-hardcoded-correlation-id.js +2 -3
- package/dist/checks/quality/observability/no-hardcoded-correlation-id.js.map +1 -1
- package/dist/checks/quality/patterns/__tests__/async-waterfall-sequential.test.d.ts +8 -0
- package/dist/checks/quality/patterns/__tests__/async-waterfall-sequential.test.d.ts.map +1 -0
- package/dist/checks/quality/patterns/__tests__/async-waterfall-sequential.test.js +87 -0
- package/dist/checks/quality/patterns/__tests__/async-waterfall-sequential.test.js.map +1 -0
- package/dist/checks/quality/patterns/__tests__/error-handling-probes.test.d.ts +2 -0
- package/dist/checks/quality/patterns/__tests__/error-handling-probes.test.d.ts.map +1 -0
- package/dist/checks/quality/patterns/__tests__/error-handling-probes.test.js +51 -0
- package/dist/checks/quality/patterns/__tests__/error-handling-probes.test.js.map +1 -0
- package/dist/checks/quality/patterns/__tests__/result-pattern-registration-guards.test.d.ts +2 -0
- package/dist/checks/quality/patterns/__tests__/result-pattern-registration-guards.test.d.ts.map +1 -0
- package/dist/checks/quality/patterns/__tests__/result-pattern-registration-guards.test.js +89 -0
- package/dist/checks/quality/patterns/__tests__/result-pattern-registration-guards.test.js.map +1 -0
- package/dist/checks/quality/patterns/__tests__/throws-documentation-analyze.test.d.ts +5 -0
- package/dist/checks/quality/patterns/__tests__/throws-documentation-analyze.test.d.ts.map +1 -0
- package/dist/checks/quality/patterns/__tests__/throws-documentation-analyze.test.js +78 -0
- package/dist/checks/quality/patterns/__tests__/throws-documentation-analyze.test.js.map +1 -0
- package/dist/checks/quality/patterns/__tests__/toctou-fp.test.js +44 -0
- package/dist/checks/quality/patterns/__tests__/toctou-fp.test.js.map +1 -1
- package/dist/checks/quality/patterns/async-waterfall-analysis.d.ts +17 -0
- package/dist/checks/quality/patterns/async-waterfall-analysis.d.ts.map +1 -0
- package/dist/checks/quality/patterns/async-waterfall-analysis.js +215 -0
- package/dist/checks/quality/patterns/async-waterfall-analysis.js.map +1 -0
- package/dist/checks/quality/patterns/async-waterfall-branch-keys.d.ts +6 -0
- package/dist/checks/quality/patterns/async-waterfall-branch-keys.d.ts.map +1 -0
- package/dist/checks/quality/patterns/async-waterfall-branch-keys.js +54 -0
- package/dist/checks/quality/patterns/async-waterfall-branch-keys.js.map +1 -0
- package/dist/checks/quality/patterns/async-waterfall-detection.d.ts.map +1 -1
- package/dist/checks/quality/patterns/async-waterfall-detection.js +3 -352
- package/dist/checks/quality/patterns/async-waterfall-detection.js.map +1 -1
- package/dist/checks/quality/patterns/containing-function-name.d.ts +3 -0
- package/dist/checks/quality/patterns/containing-function-name.d.ts.map +1 -0
- package/dist/checks/quality/patterns/containing-function-name.js +21 -0
- package/dist/checks/quality/patterns/containing-function-name.js.map +1 -0
- package/dist/checks/quality/patterns/error-handling-quality.d.ts +3 -0
- package/dist/checks/quality/patterns/error-handling-quality.d.ts.map +1 -1
- package/dist/checks/quality/patterns/error-handling-quality.js +150 -30
- package/dist/checks/quality/patterns/error-handling-quality.js.map +1 -1
- package/dist/checks/quality/patterns/result-pattern-consistency.d.ts +3 -0
- package/dist/checks/quality/patterns/result-pattern-consistency.d.ts.map +1 -1
- package/dist/checks/quality/patterns/result-pattern-consistency.js +136 -69
- package/dist/checks/quality/patterns/result-pattern-consistency.js.map +1 -1
- package/dist/checks/quality/patterns/throws-documentation-analyze.d.ts +14 -0
- package/dist/checks/quality/patterns/throws-documentation-analyze.d.ts.map +1 -0
- package/dist/checks/quality/patterns/throws-documentation-analyze.js +352 -0
- package/dist/checks/quality/patterns/throws-documentation-analyze.js.map +1 -0
- package/dist/checks/quality/patterns/throws-documentation-constants.d.ts +15 -0
- package/dist/checks/quality/patterns/throws-documentation-constants.d.ts.map +1 -0
- package/dist/checks/quality/patterns/throws-documentation-constants.js +94 -0
- package/dist/checks/quality/patterns/throws-documentation-constants.js.map +1 -0
- package/dist/checks/quality/patterns/throws-documentation.d.ts +1 -11
- package/dist/checks/quality/patterns/throws-documentation.d.ts.map +1 -1
- package/dist/checks/quality/patterns/throws-documentation.js +4 -472
- package/dist/checks/quality/patterns/throws-documentation.js.map +1 -1
- package/dist/checks/quality/patterns/toctou-race-condition-classify.d.ts +23 -0
- package/dist/checks/quality/patterns/toctou-race-condition-classify.d.ts.map +1 -0
- package/dist/checks/quality/patterns/toctou-race-condition-classify.js +125 -0
- package/dist/checks/quality/patterns/toctou-race-condition-classify.js.map +1 -0
- package/dist/checks/quality/patterns/toctou-race-condition-collection.d.ts +24 -0
- package/dist/checks/quality/patterns/toctou-race-condition-collection.d.ts.map +1 -0
- package/dist/checks/quality/patterns/toctou-race-condition-collection.js +248 -0
- package/dist/checks/quality/patterns/toctou-race-condition-collection.js.map +1 -0
- package/dist/checks/quality/patterns/toctou-race-condition-constants.d.ts +32 -0
- package/dist/checks/quality/patterns/toctou-race-condition-constants.d.ts.map +1 -0
- package/dist/checks/quality/patterns/toctou-race-condition-constants.js +115 -0
- package/dist/checks/quality/patterns/toctou-race-condition-constants.js.map +1 -0
- package/dist/checks/quality/patterns/toctou-race-condition.d.ts +1 -29
- package/dist/checks/quality/patterns/toctou-race-condition.d.ts.map +1 -1
- package/dist/checks/quality/patterns/toctou-race-condition.js +11 -536
- package/dist/checks/quality/patterns/toctou-race-condition.js.map +1 -1
- package/dist/checks/quality/unused-config-options.d.ts.map +1 -1
- package/dist/checks/quality/unused-config-options.js +0 -4
- package/dist/checks/quality/unused-config-options.js.map +1 -1
- package/dist/checks/resilience/__tests__/detached-promises-sync-detection.test.d.ts +2 -0
- package/dist/checks/resilience/__tests__/detached-promises-sync-detection.test.d.ts.map +1 -0
- package/dist/checks/resilience/__tests__/detached-promises-sync-detection.test.js +98 -0
- package/dist/checks/resilience/__tests__/detached-promises-sync-detection.test.js.map +1 -0
- package/dist/checks/resilience/callback-invocation-safe.d.ts.map +1 -1
- package/dist/checks/resilience/callback-invocation-safe.js +0 -1
- package/dist/checks/resilience/callback-invocation-safe.js.map +1 -1
- package/dist/checks/resilience/context-leakage.d.ts.map +1 -1
- package/dist/checks/resilience/context-leakage.js +1 -0
- package/dist/checks/resilience/context-leakage.js.map +1 -1
- package/dist/checks/resilience/detached-promises-detection.d.ts +7 -0
- package/dist/checks/resilience/detached-promises-detection.d.ts.map +1 -0
- package/dist/checks/resilience/detached-promises-detection.js +228 -0
- package/dist/checks/resilience/detached-promises-detection.js.map +1 -0
- package/dist/checks/resilience/detached-promises-sync-constants.d.ts +36 -0
- package/dist/checks/resilience/detached-promises-sync-constants.d.ts.map +1 -0
- package/dist/checks/resilience/detached-promises-sync-constants.js +299 -0
- package/dist/checks/resilience/detached-promises-sync-constants.js.map +1 -0
- package/dist/checks/resilience/detached-promises-sync-detection.d.ts +14 -0
- package/dist/checks/resilience/detached-promises-sync-detection.d.ts.map +1 -0
- package/dist/checks/resilience/detached-promises-sync-detection.js +69 -0
- package/dist/checks/resilience/detached-promises-sync-detection.js.map +1 -0
- package/dist/checks/resilience/detached-promises.d.ts +1 -14
- package/dist/checks/resilience/detached-promises.d.ts.map +1 -1
- package/dist/checks/resilience/detached-promises.js +2 -598
- package/dist/checks/resilience/detached-promises.js.map +1 -1
- package/dist/checks/resilience/no-raw-fetch.d.ts.map +1 -1
- package/dist/checks/resilience/no-raw-fetch.js +1 -0
- package/dist/checks/resilience/no-raw-fetch.js.map +1 -1
- package/dist/checks/resilience/no-unbounded-concurrency.d.ts.map +1 -1
- package/dist/checks/resilience/no-unbounded-concurrency.js +1 -0
- package/dist/checks/resilience/no-unbounded-concurrency.js.map +1 -1
- package/dist/checks/security/sql-injection.d.ts.map +1 -1
- package/dist/checks/security/sql-injection.js +0 -1
- package/dist/checks/security/sql-injection.js.map +1 -1
- package/dist/display/architecture.d.ts.map +1 -1
- package/dist/display/architecture.js +1 -0
- package/dist/display/architecture.js.map +1 -1
- package/dist/display/types.d.ts.map +1 -1
- package/dist/display/types.js +0 -1
- package/dist/display/types.js.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Null-safety AST heuristics for convention-based detection.
|
|
3
|
+
*/
|
|
4
|
+
import * as ts from 'typescript';
|
|
5
|
+
import { isSafeFluentMethod as isListedSafeFluentMethod, SAFE_METHOD_PREFIXES, } from './null-safety-config.js';
|
|
6
|
+
/**
|
|
7
|
+
* Check if a call expression is a known safe builder pattern.
|
|
8
|
+
*
|
|
9
|
+
* Two paths:
|
|
10
|
+
* 1. Explicit allowlist (`SAFE_BUILDER_PREFIXES`) — exact-prefix match on the
|
|
11
|
+
* full call text (e.g. `z.string(`, `pathToFileURL(`).
|
|
12
|
+
* 2. Convention heuristic — when the callee is a bare identifier whose name
|
|
13
|
+
* starts with a recognised safe verb (`get*`, `read*`, `resolve*`,
|
|
14
|
+
* `current*`, `create*`, `build*`, etc.). This is the same convention that
|
|
15
|
+
* already covers fluent-chain methods via `isSafeFluentMethod`; applying it
|
|
16
|
+
* to standalone calls closes the gap for helpers like `resolveProjectPaths`,
|
|
17
|
+
* `readScope`, `currentScenarioRegistry`, etc. whose names convey the same
|
|
18
|
+
* "returns a value or throws" contract.
|
|
19
|
+
*/
|
|
20
|
+
export function isSafeBuilderPattern(expression, sourceFile, safeBuilders) {
|
|
21
|
+
const text = expression.getText(sourceFile);
|
|
22
|
+
if (safeBuilders.some((prefix) => text.startsWith(prefix)))
|
|
23
|
+
return true;
|
|
24
|
+
if (ts.isIdentifier(expression.expression)) {
|
|
25
|
+
const name = expression.expression.text;
|
|
26
|
+
if (isSafeFluentMethod(name))
|
|
27
|
+
return true;
|
|
28
|
+
// Local `repoFor()`-style factories return a fresh non-null handle.
|
|
29
|
+
if (name.endsWith('For'))
|
|
30
|
+
return true;
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
if (ts.isPropertyAccessExpression(expression.expression)) {
|
|
34
|
+
return isSafeFluentMethod(expression.expression.name.text);
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a method name is a known safe fluent API method.
|
|
40
|
+
* Matches either an exact entry in SAFE_FLUENT_METHOD_NAMES or a method whose name
|
|
41
|
+
* starts with a common safe prefix (get, set, is, has, to, etc.).
|
|
42
|
+
*/
|
|
43
|
+
export function isSafeFluentMethod(methodName) {
|
|
44
|
+
if (isListedSafeFluentMethod(methodName))
|
|
45
|
+
return true;
|
|
46
|
+
return SAFE_METHOD_PREFIXES.some((prefix) => methodName.startsWith(prefix));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Walk ancestors to find an enclosing truthiness guard whose condition
|
|
50
|
+
* references the access's base expression — an `if (...)`, a `cond ? … : …`,
|
|
51
|
+
* or the left side of a `&&` chain (e.g. `if (candidates.length === 1 &&
|
|
52
|
+
* candidates[0]) { … candidates[0].bodyHash … }`).
|
|
53
|
+
*
|
|
54
|
+
* The line-local {@link SAFE_PATTERNS} scan only inspects the physical line
|
|
55
|
+
* of the access, so a guard placed on a *previous* line is missed. This
|
|
56
|
+
* closes that cross-line gap. Substring matching is intentionally lenient:
|
|
57
|
+
* the check errs toward treating a guarded access as safe (fewer false
|
|
58
|
+
* positives), consistent with the existing line-local guard handling.
|
|
59
|
+
*/
|
|
60
|
+
export function isGuardedByEnclosingCondition(node, sourceFile) {
|
|
61
|
+
const baseText = node.expression.getText(sourceFile);
|
|
62
|
+
let current = node;
|
|
63
|
+
let parent = node.parent;
|
|
64
|
+
while (parent) {
|
|
65
|
+
if (ts.isIfStatement(parent) && parent.expression.getText(sourceFile).includes(baseText)) {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
if (ts.isConditionalExpression(parent) &&
|
|
69
|
+
parent.condition.getText(sourceFile).includes(baseText)) {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
if (ts.isBinaryExpression(parent) &&
|
|
73
|
+
parent.operatorToken.kind === ts.SyntaxKind.AmpersandAmpersandToken &&
|
|
74
|
+
parent.right === current &&
|
|
75
|
+
parent.left.getText(sourceFile).includes(baseText)) {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
current = parent;
|
|
79
|
+
parent = parent.parent;
|
|
80
|
+
}
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Check if a property access originates from `this`.
|
|
85
|
+
* Accessing properties on `this` is always safe — the object exists within its own methods.
|
|
86
|
+
*/
|
|
87
|
+
export function isThisAccess(node) {
|
|
88
|
+
let current = node.expression;
|
|
89
|
+
while (ts.isCallExpression(current) || ts.isPropertyAccessExpression(current)) {
|
|
90
|
+
current = current.expression;
|
|
91
|
+
}
|
|
92
|
+
return current.kind === ts.SyntaxKind.ThisKeyword;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Count the depth of a method chain (number of chained property accesses / calls).
|
|
96
|
+
* e.g. `a.b().c().d` has depth 3.
|
|
97
|
+
*/
|
|
98
|
+
export function getChainDepth(node) {
|
|
99
|
+
let depth = 0;
|
|
100
|
+
let current = node.expression;
|
|
101
|
+
while (ts.isCallExpression(current) || ts.isPropertyAccessExpression(current)) {
|
|
102
|
+
if (ts.isCallExpression(current)) {
|
|
103
|
+
depth++;
|
|
104
|
+
current = current.expression;
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
current = current.expression;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return depth;
|
|
111
|
+
}
|
|
112
|
+
const SCHEMA_BUILDER_METHODS = new Set([
|
|
113
|
+
'strict',
|
|
114
|
+
'optional',
|
|
115
|
+
'safeParse',
|
|
116
|
+
'parse',
|
|
117
|
+
'pipe',
|
|
118
|
+
'superRefine',
|
|
119
|
+
'catchall',
|
|
120
|
+
'passthrough',
|
|
121
|
+
'refine',
|
|
122
|
+
'default',
|
|
123
|
+
'transform',
|
|
124
|
+
]);
|
|
125
|
+
function calleeRootEndsWithSchema(expr, sourceFile) {
|
|
126
|
+
let current = expr;
|
|
127
|
+
while (current) {
|
|
128
|
+
if (ts.isIdentifier(current)) {
|
|
129
|
+
return current.text.endsWith('Schema') || current.text === 'z';
|
|
130
|
+
}
|
|
131
|
+
if (ts.isPropertyAccessExpression(current)) {
|
|
132
|
+
if (current.expression.getText(sourceFile) === 'z')
|
|
133
|
+
return true;
|
|
134
|
+
current = current.expression;
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
if (ts.isCallExpression(current)) {
|
|
138
|
+
current = current.expression;
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
return false;
|
|
144
|
+
}
|
|
145
|
+
function schemaBuilderCallMatches(call, sourceFile) {
|
|
146
|
+
const callee = call.expression;
|
|
147
|
+
if (ts.isPropertyAccessExpression(callee) &&
|
|
148
|
+
SCHEMA_BUILDER_METHODS.has(callee.name.text) &&
|
|
149
|
+
calleeRootEndsWithSchema(callee.expression, sourceFile)) {
|
|
150
|
+
return { matched: true, next: callee };
|
|
151
|
+
}
|
|
152
|
+
if (ts.isIdentifier(callee) &&
|
|
153
|
+
(callee.text.endsWith('Schema') || callee.text.endsWith('Namespace'))) {
|
|
154
|
+
return { matched: true, next: callee };
|
|
155
|
+
}
|
|
156
|
+
let next = callee;
|
|
157
|
+
if (ts.isPropertyAccessExpression(next))
|
|
158
|
+
next = next.expression;
|
|
159
|
+
return { matched: false, next };
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Zod and project schema-builder chains (including `FooSchema.strict().safeParse`).
|
|
163
|
+
*/
|
|
164
|
+
export function isSchemaBuilderChain(node, sourceFile) {
|
|
165
|
+
if (isZodBuilderChain(node, sourceFile))
|
|
166
|
+
return true;
|
|
167
|
+
let current = node.expression;
|
|
168
|
+
while (current) {
|
|
169
|
+
if (ts.isCallExpression(current)) {
|
|
170
|
+
const result = schemaBuilderCallMatches(current, sourceFile);
|
|
171
|
+
if (result.matched)
|
|
172
|
+
return true;
|
|
173
|
+
current = result.next;
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
if (ts.isIdentifier(current)) {
|
|
177
|
+
return current.text.endsWith('Schema');
|
|
178
|
+
}
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
function isFunctionParameter(name, fn) {
|
|
184
|
+
return fn.parameters.some((p) => ts.isIdentifier(p.name) && p.name.text === name);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* True when accessing `arr[i].prop` where `i` is a parameter of the enclosing
|
|
188
|
+
* callback (e.g. chunked POST `timeoutFor: (_chunk, i) => chunks[i].signals`).
|
|
189
|
+
*/
|
|
190
|
+
export function isCallbackIndexGuarded(node, _sourceFile) {
|
|
191
|
+
const receiver = node.expression;
|
|
192
|
+
if (!ts.isElementAccessExpression(receiver))
|
|
193
|
+
return false;
|
|
194
|
+
const index = receiver.argumentExpression;
|
|
195
|
+
if (!index || !ts.isIdentifier(index))
|
|
196
|
+
return false;
|
|
197
|
+
const indexName = index.text;
|
|
198
|
+
let current = node.parent;
|
|
199
|
+
while (current) {
|
|
200
|
+
if ((ts.isArrowFunction(current) || ts.isFunctionExpression(current)) &&
|
|
201
|
+
isFunctionParameter(indexName, current))
|
|
202
|
+
return true;
|
|
203
|
+
if (ts.isFunctionDeclaration(current) && isFunctionParameter(indexName, current))
|
|
204
|
+
return true;
|
|
205
|
+
current = current.parent;
|
|
206
|
+
}
|
|
207
|
+
return false;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Check if a property access chain is on a Zod method call
|
|
211
|
+
* Handles chained calls like z.string().min(1).optional()
|
|
212
|
+
*/
|
|
213
|
+
export function isZodBuilderChain(node, sourceFile) {
|
|
214
|
+
// Walk the full expression chain to find if it originates from z.xxx()
|
|
215
|
+
// Handles arbitrary depth: z.string().regex().optional().superRefine().pipe()
|
|
216
|
+
let current = node.expression;
|
|
217
|
+
while (current) {
|
|
218
|
+
if (ts.isCallExpression(current)) {
|
|
219
|
+
const result = checkZodCallExpression(current, sourceFile);
|
|
220
|
+
if (result.resolved)
|
|
221
|
+
return result.isZod;
|
|
222
|
+
current = result.next;
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
if (ts.isPropertyAccessExpression(current)) {
|
|
226
|
+
if (current.expression.getText(sourceFile) === 'z')
|
|
227
|
+
return true;
|
|
228
|
+
current = current.expression;
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
if (ts.isIdentifier(current)) {
|
|
232
|
+
return current.text === 'z';
|
|
233
|
+
}
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
return false;
|
|
237
|
+
}
|
|
238
|
+
/** Check if a call expression callee originates from z.xxx() */
|
|
239
|
+
export function checkZodCallExpression(node, sourceFile) {
|
|
240
|
+
const callee = node.expression;
|
|
241
|
+
if (ts.isPropertyAccessExpression(callee)) {
|
|
242
|
+
if (callee.getText(sourceFile).startsWith('z.'))
|
|
243
|
+
return { resolved: true, isZod: true };
|
|
244
|
+
return { resolved: false, next: callee.expression };
|
|
245
|
+
}
|
|
246
|
+
if (ts.isIdentifier(callee)) {
|
|
247
|
+
return { resolved: true, isZod: callee.text === 'z' };
|
|
248
|
+
}
|
|
249
|
+
return { resolved: false, next: callee };
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Check if a property access is part of a fluent API chain
|
|
253
|
+
* Handles patterns like promise.then().catch() or queryBuilder.where().orderBy()
|
|
254
|
+
*/
|
|
255
|
+
export function isFluentChain(node) {
|
|
256
|
+
const expression = node.expression;
|
|
257
|
+
// Check if we're accessing a property on a call expression
|
|
258
|
+
if (!ts.isCallExpression(expression))
|
|
259
|
+
return false;
|
|
260
|
+
// Walk the chain — if ANY method in the chain is a known fluent method, the chain is safe
|
|
261
|
+
let current = expression;
|
|
262
|
+
while (ts.isCallExpression(current)) {
|
|
263
|
+
if (ts.isPropertyAccessExpression(current.expression)) {
|
|
264
|
+
const methodName = current.expression.name.text;
|
|
265
|
+
if (isSafeFluentMethod(methodName)) {
|
|
266
|
+
return true;
|
|
267
|
+
}
|
|
268
|
+
// Walk deeper into the chain
|
|
269
|
+
current = current.expression.expression;
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
return false;
|
|
275
|
+
}
|
|
276
|
+
//# sourceMappingURL=null-safety-heuristics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-safety-heuristics.js","sourceRoot":"","sources":["../../../../src/checks/quality/data-integrity/null-safety-heuristics.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EACL,kBAAkB,IAAI,wBAAwB,EAC9C,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,oBAAoB,CAClC,UAA6B,EAC7B,UAAyB,EACzB,YAA+B;IAE/B,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC5C,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAAE,OAAO,IA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AAC,UAAU,EAAE,CAAC;IACtD,CAAC;IACD,IAAI,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5B,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;IACxD,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC3C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,IAAiC;IAC7D,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IAEnC,2DAA2D;IAC3D,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,UAAU,CAAC;QAAE,OAAO,KAAK,CAAC;IAEnD,0FAA0F;IAC1F,IAAI,OAAO,GAAkB,UAAU,CAAC;IAExC,OAAO,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;QACpC,IAAI,EAAE,CAAC,0BAA0B,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;YACtD,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;YAChD,IAAI,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC;gBACnC,OAAO,IAAI,CAAC;YACd,CAAC;YACD,6BAA6B;YAC7B,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC;YACxC,SAAS;QACX,CAAC;QACD,MAAM;IACR,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Safe-by-construction call prefixes and fluent-method allowlists for null-safety.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Call prefixes whose results are non-null by construction, so a property
|
|
6
|
+
* access on them needs no guard. Scope is deliberately limited to facts that
|
|
7
|
+
* hold for ANY codebase.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SAFE_BUILDER_PREFIXES: string[];
|
|
10
|
+
/** Known safe method names in fluent APIs that always return `this` or non-null values. */
|
|
11
|
+
export declare const SAFE_FLUENT_METHOD_NAMES: readonly ["then", "catch", "finally", "map", "filter", "reduce", "flatMap", "forEach", "some", "every", "find", "findIndex", "findLast", "findLastIndex", "includes", "indexOf", "lastIndexOf", "at", "flat", "entries", "keys", "values", "slice", "concat", "sort", "reverse", "join", "push", "pop", "shift", "unshift", "fill", "trim", "trimStart", "trimEnd", "toLowerCase", "toUpperCase", "toLocaleLowerCase", "toLocaleUpperCase", "split", "replace", "replaceAll", "substring", "substr", "padStart", "padEnd", "charAt", "charCodeAt", "startsWith", "endsWith", "match", "search", "normalize", "repeat", "next", "toString", "json", "send", "status", "header", "type", "code", "where", "andWhere", "orWhere", "having", "orderBy", "addOrderBy", "groupBy", "addGroupBy", "select", "addSelect", "leftJoin", "leftJoinAndSelect", "innerJoin", "innerJoinAndSelect", "limit", "offset", "skip", "take", "getOne", "getMany", "getRawOne", "getRawMany", "execute", "mapErr", "andThen", "orElse", "unwrapOr", "match", "set", "with", "withId", "withCode", "withMessage", "withDetails", "withContext", "withCause", "build", "add", "remove", "update", "delete", "insert", "subscribe", "unsubscribe", "emit", "on", "off", "once", "child", "bindings", "level", "info", "warn", "error", "debug", "trace", "fatal", "notNull", "default", "references", "primaryKey", "unique", "$default", "$onUpdate", "from", "returning", "onConflictDoNothing", "onConflictDoUpdate", "rightJoin", "fullJoin", "run", "all", "get", "pluck", "iterate", "bind", "columns", "expand", "getLineAndCharacterOfPosition", "getText", "getStart", "getEnd", "getWidth", "getFullWidth", "getSourceFile", "getChildAt", "getChildren", "getFirstToken", "getLastToken", "forEachChild", "has", "clear", "size", "getInstance", "create", "of", "merge", "optsWithGlobals", "mergeWith", "toBe", "toEqual", "toStrictEqual", "toBeDefined", "toBeUndefined", "toBeNull", "toBeTruthy", "toBeFalsy", "toBeGreaterThan", "toBeGreaterThanOrEqual", "toBeLessThan", "toBeLessThanOrEqual", "toBeCloseTo", "toBeInstanceOf", "toBeNaN", "toContain", "toContainEqual", "toHaveLength", "toHaveProperty", "toHaveBeenCalled", "toHaveBeenCalledTimes", "toHaveBeenCalledWith", "toHaveBeenLastCalledWith", "toHaveBeenNthCalledWith", "toHaveReturned", "toHaveReturnedTimes", "toHaveReturnedWith", "toHaveLastReturnedWith", "toHaveNthReturnedWith", "toThrow", "toThrowError", "toMatch", "toMatchObject", "toMatchSnapshot", "toMatchInlineSnapshot", "resolves", "rejects", "not", "mockResolvedValue", "mockResolvedValueOnce", "mockRejectedValue", "mockRejectedValueOnce", "mockReturnValue", "mockReturnValueOnce", "mockImplementation", "mockImplementationOnce", "mockClear", "mockReset", "mockRestore", "mockReturnThis", "mockName", "update", "digest", "final", "unref", "ref", "kill", "format", "formatToParts", "resolvedOptions", "unwrapErr", "_unsafeUnwrap", "_unsafeUnwrapErr", "provideValue", "provideClass", "provideFactory", "provide", "$type", "command", "description", "option", "requiredOption", "action", "argument", "version", "name", "alias", "aliases", "addCommand", "addOption", "addArgument", "hook", "usage", "summary", "helpOption", "addHelpText", "showHelpAfterError", "showSuggestionAfterError", "exitOverride", "configureOutput", "configureHelp", "allowExcessArguments", "allowUnknownOption", "enablePositionalOptions", "passThroughOptions", "storeOptionsAsProperties", "copyInheritedSettings", "combineFlagAndOptionalValue"];
|
|
12
|
+
export declare function isSafeFluentMethod(methodName: string): boolean;
|
|
13
|
+
//# sourceMappingURL=null-safety-prefixes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-safety-prefixes.d.ts","sourceRoot":"","sources":["../../../../src/checks/quality/data-integrity/null-safety-prefixes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,UA0DjC,CAAC;AAEF,2FAA2F;AAC3F,eAAO,MAAM,wBAAwB,g4GAoQ3B,CAAC;AAEX,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAE9D"}
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Safe-by-construction call prefixes and fluent-method allowlists for null-safety.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Call prefixes whose results are non-null by construction, so a property
|
|
6
|
+
* access on them needs no guard. Scope is deliberately limited to facts that
|
|
7
|
+
* hold for ANY codebase.
|
|
8
|
+
*/
|
|
9
|
+
export const SAFE_BUILDER_PREFIXES = [
|
|
10
|
+
// 1. Language / runtime guarantees
|
|
11
|
+
'Object.entries',
|
|
12
|
+
'Object.values',
|
|
13
|
+
'Object.keys',
|
|
14
|
+
'Object.assign',
|
|
15
|
+
'Object.freeze',
|
|
16
|
+
'Array.from',
|
|
17
|
+
'Array.isArray',
|
|
18
|
+
'String(',
|
|
19
|
+
'Number(',
|
|
20
|
+
'Boolean(',
|
|
21
|
+
'Buffer.from',
|
|
22
|
+
'JSON.stringify',
|
|
23
|
+
'JSON.parse',
|
|
24
|
+
'process.memoryUsage',
|
|
25
|
+
'pathToFileURL(',
|
|
26
|
+
'fileURLToPath(',
|
|
27
|
+
'new URL(',
|
|
28
|
+
'spawn(',
|
|
29
|
+
'fork(',
|
|
30
|
+
'createHash(',
|
|
31
|
+
'createHmac(',
|
|
32
|
+
'createCipheriv(',
|
|
33
|
+
'createDecipheriv(',
|
|
34
|
+
'new Intl.',
|
|
35
|
+
'Intl.NumberFormat',
|
|
36
|
+
'Intl.DateTimeFormat',
|
|
37
|
+
'sourceFile.getLineAndCharacterOfPosition',
|
|
38
|
+
'node.getText',
|
|
39
|
+
'node.getStart',
|
|
40
|
+
'node.getEnd',
|
|
41
|
+
'node.getWidth',
|
|
42
|
+
'node.getFullWidth',
|
|
43
|
+
'window.matchMedia',
|
|
44
|
+
'document.createElement',
|
|
45
|
+
'document.createTextNode',
|
|
46
|
+
// 2. Common library builder / query APIs
|
|
47
|
+
'z.',
|
|
48
|
+
'createQueryBuilder',
|
|
49
|
+
'getRepository',
|
|
50
|
+
'EntityManager.',
|
|
51
|
+
'queryBuilder.',
|
|
52
|
+
'repository.',
|
|
53
|
+
'Result.',
|
|
54
|
+
'ResultAsync.',
|
|
55
|
+
'prepare(',
|
|
56
|
+
'drizzle(',
|
|
57
|
+
'db.select',
|
|
58
|
+
'db.insert',
|
|
59
|
+
'db.update',
|
|
60
|
+
'db.delete',
|
|
61
|
+
'res.status',
|
|
62
|
+
'response.status',
|
|
63
|
+
// 3. Generic builder-pattern conventions
|
|
64
|
+
'builder.',
|
|
65
|
+
'ResultBuilder.',
|
|
66
|
+
'ScenarioResultBuilder.',
|
|
67
|
+
];
|
|
68
|
+
/** Known safe method names in fluent APIs that always return `this` or non-null values. */
|
|
69
|
+
export const SAFE_FLUENT_METHOD_NAMES = [
|
|
70
|
+
'then',
|
|
71
|
+
'catch',
|
|
72
|
+
'finally',
|
|
73
|
+
'map',
|
|
74
|
+
'filter',
|
|
75
|
+
'reduce',
|
|
76
|
+
'flatMap',
|
|
77
|
+
'forEach',
|
|
78
|
+
'some',
|
|
79
|
+
'every',
|
|
80
|
+
'find',
|
|
81
|
+
'findIndex',
|
|
82
|
+
'findLast',
|
|
83
|
+
'findLastIndex',
|
|
84
|
+
'includes',
|
|
85
|
+
'indexOf',
|
|
86
|
+
'lastIndexOf',
|
|
87
|
+
'at',
|
|
88
|
+
'flat',
|
|
89
|
+
'entries',
|
|
90
|
+
'keys',
|
|
91
|
+
'values',
|
|
92
|
+
'slice',
|
|
93
|
+
'concat',
|
|
94
|
+
'sort',
|
|
95
|
+
'reverse',
|
|
96
|
+
'join',
|
|
97
|
+
'push',
|
|
98
|
+
'pop',
|
|
99
|
+
'shift',
|
|
100
|
+
'unshift',
|
|
101
|
+
'fill',
|
|
102
|
+
'trim',
|
|
103
|
+
'trimStart',
|
|
104
|
+
'trimEnd',
|
|
105
|
+
'toLowerCase',
|
|
106
|
+
'toUpperCase',
|
|
107
|
+
'toLocaleLowerCase',
|
|
108
|
+
'toLocaleUpperCase',
|
|
109
|
+
'split',
|
|
110
|
+
'replace',
|
|
111
|
+
'replaceAll',
|
|
112
|
+
'substring',
|
|
113
|
+
'substr',
|
|
114
|
+
'padStart',
|
|
115
|
+
'padEnd',
|
|
116
|
+
'charAt',
|
|
117
|
+
'charCodeAt',
|
|
118
|
+
'startsWith',
|
|
119
|
+
'endsWith',
|
|
120
|
+
'match',
|
|
121
|
+
'search',
|
|
122
|
+
'normalize',
|
|
123
|
+
'repeat',
|
|
124
|
+
'next',
|
|
125
|
+
'toString',
|
|
126
|
+
'json',
|
|
127
|
+
'send',
|
|
128
|
+
'status',
|
|
129
|
+
'header',
|
|
130
|
+
'type',
|
|
131
|
+
'code',
|
|
132
|
+
'where',
|
|
133
|
+
'andWhere',
|
|
134
|
+
'orWhere',
|
|
135
|
+
'having',
|
|
136
|
+
'orderBy',
|
|
137
|
+
'addOrderBy',
|
|
138
|
+
'groupBy',
|
|
139
|
+
'addGroupBy',
|
|
140
|
+
'select',
|
|
141
|
+
'addSelect',
|
|
142
|
+
'leftJoin',
|
|
143
|
+
'leftJoinAndSelect',
|
|
144
|
+
'innerJoin',
|
|
145
|
+
'innerJoinAndSelect',
|
|
146
|
+
'limit',
|
|
147
|
+
'offset',
|
|
148
|
+
'skip',
|
|
149
|
+
'take',
|
|
150
|
+
'getOne',
|
|
151
|
+
'getMany',
|
|
152
|
+
'getRawOne',
|
|
153
|
+
'getRawMany',
|
|
154
|
+
'execute',
|
|
155
|
+
'mapErr',
|
|
156
|
+
'andThen',
|
|
157
|
+
'orElse',
|
|
158
|
+
'unwrapOr',
|
|
159
|
+
'match',
|
|
160
|
+
'set',
|
|
161
|
+
'with',
|
|
162
|
+
'withId',
|
|
163
|
+
'withCode',
|
|
164
|
+
'withMessage',
|
|
165
|
+
'withDetails',
|
|
166
|
+
'withContext',
|
|
167
|
+
'withCause',
|
|
168
|
+
'build',
|
|
169
|
+
'add',
|
|
170
|
+
'remove',
|
|
171
|
+
'update',
|
|
172
|
+
'delete',
|
|
173
|
+
'insert',
|
|
174
|
+
'subscribe',
|
|
175
|
+
'unsubscribe',
|
|
176
|
+
'emit',
|
|
177
|
+
'on',
|
|
178
|
+
'off',
|
|
179
|
+
'once',
|
|
180
|
+
'child',
|
|
181
|
+
'bindings',
|
|
182
|
+
'level',
|
|
183
|
+
'info',
|
|
184
|
+
'warn',
|
|
185
|
+
'error',
|
|
186
|
+
'debug',
|
|
187
|
+
'trace',
|
|
188
|
+
'fatal',
|
|
189
|
+
'notNull',
|
|
190
|
+
'default',
|
|
191
|
+
'references',
|
|
192
|
+
'primaryKey',
|
|
193
|
+
'unique',
|
|
194
|
+
'$default',
|
|
195
|
+
'$onUpdate',
|
|
196
|
+
'from',
|
|
197
|
+
'returning',
|
|
198
|
+
'onConflictDoNothing',
|
|
199
|
+
'onConflictDoUpdate',
|
|
200
|
+
'rightJoin',
|
|
201
|
+
'fullJoin',
|
|
202
|
+
'run',
|
|
203
|
+
'all',
|
|
204
|
+
'get',
|
|
205
|
+
'pluck',
|
|
206
|
+
'iterate',
|
|
207
|
+
'bind',
|
|
208
|
+
'columns',
|
|
209
|
+
'expand',
|
|
210
|
+
'getLineAndCharacterOfPosition',
|
|
211
|
+
'getText',
|
|
212
|
+
'getStart',
|
|
213
|
+
'getEnd',
|
|
214
|
+
'getWidth',
|
|
215
|
+
'getFullWidth',
|
|
216
|
+
'getSourceFile',
|
|
217
|
+
'getChildAt',
|
|
218
|
+
'getChildren',
|
|
219
|
+
'getFirstToken',
|
|
220
|
+
'getLastToken',
|
|
221
|
+
'forEachChild',
|
|
222
|
+
'has',
|
|
223
|
+
'clear',
|
|
224
|
+
'size',
|
|
225
|
+
'getInstance',
|
|
226
|
+
'create',
|
|
227
|
+
'of',
|
|
228
|
+
'merge',
|
|
229
|
+
'optsWithGlobals',
|
|
230
|
+
'mergeWith',
|
|
231
|
+
'toBe',
|
|
232
|
+
'toEqual',
|
|
233
|
+
'toStrictEqual',
|
|
234
|
+
'toBeDefined',
|
|
235
|
+
'toBeUndefined',
|
|
236
|
+
'toBeNull',
|
|
237
|
+
'toBeTruthy',
|
|
238
|
+
'toBeFalsy',
|
|
239
|
+
'toBeGreaterThan',
|
|
240
|
+
'toBeGreaterThanOrEqual',
|
|
241
|
+
'toBeLessThan',
|
|
242
|
+
'toBeLessThanOrEqual',
|
|
243
|
+
'toBeCloseTo',
|
|
244
|
+
'toBeInstanceOf',
|
|
245
|
+
'toBeNaN',
|
|
246
|
+
'toContain',
|
|
247
|
+
'toContainEqual',
|
|
248
|
+
'toHaveLength',
|
|
249
|
+
'toHaveProperty',
|
|
250
|
+
'toHaveBeenCalled',
|
|
251
|
+
'toHaveBeenCalledTimes',
|
|
252
|
+
'toHaveBeenCalledWith',
|
|
253
|
+
'toHaveBeenLastCalledWith',
|
|
254
|
+
'toHaveBeenNthCalledWith',
|
|
255
|
+
'toHaveReturned',
|
|
256
|
+
'toHaveReturnedTimes',
|
|
257
|
+
'toHaveReturnedWith',
|
|
258
|
+
'toHaveLastReturnedWith',
|
|
259
|
+
'toHaveNthReturnedWith',
|
|
260
|
+
'toThrow',
|
|
261
|
+
'toThrowError',
|
|
262
|
+
'toMatch',
|
|
263
|
+
'toMatchObject',
|
|
264
|
+
'toMatchSnapshot',
|
|
265
|
+
'toMatchInlineSnapshot',
|
|
266
|
+
'resolves',
|
|
267
|
+
'rejects',
|
|
268
|
+
'not',
|
|
269
|
+
'mockResolvedValue',
|
|
270
|
+
'mockResolvedValueOnce',
|
|
271
|
+
'mockRejectedValue',
|
|
272
|
+
'mockRejectedValueOnce',
|
|
273
|
+
'mockReturnValue',
|
|
274
|
+
'mockReturnValueOnce',
|
|
275
|
+
'mockImplementation',
|
|
276
|
+
'mockImplementationOnce',
|
|
277
|
+
'mockClear',
|
|
278
|
+
'mockReset',
|
|
279
|
+
'mockRestore',
|
|
280
|
+
'mockReturnThis',
|
|
281
|
+
'mockName',
|
|
282
|
+
'update',
|
|
283
|
+
'digest',
|
|
284
|
+
'final',
|
|
285
|
+
'unref',
|
|
286
|
+
'ref',
|
|
287
|
+
'kill',
|
|
288
|
+
'format',
|
|
289
|
+
'formatToParts',
|
|
290
|
+
'resolvedOptions',
|
|
291
|
+
'unwrapErr',
|
|
292
|
+
'_unsafeUnwrap',
|
|
293
|
+
'_unsafeUnwrapErr',
|
|
294
|
+
'provideValue',
|
|
295
|
+
'provideClass',
|
|
296
|
+
'provideFactory',
|
|
297
|
+
'provide',
|
|
298
|
+
'$type',
|
|
299
|
+
'command',
|
|
300
|
+
'description',
|
|
301
|
+
'option',
|
|
302
|
+
'requiredOption',
|
|
303
|
+
'action',
|
|
304
|
+
'argument',
|
|
305
|
+
'version',
|
|
306
|
+
'name',
|
|
307
|
+
'alias',
|
|
308
|
+
'aliases',
|
|
309
|
+
'addCommand',
|
|
310
|
+
'addOption',
|
|
311
|
+
'addArgument',
|
|
312
|
+
'hook',
|
|
313
|
+
'usage',
|
|
314
|
+
'summary',
|
|
315
|
+
'helpOption',
|
|
316
|
+
'addHelpText',
|
|
317
|
+
'showHelpAfterError',
|
|
318
|
+
'showSuggestionAfterError',
|
|
319
|
+
'exitOverride',
|
|
320
|
+
'configureOutput',
|
|
321
|
+
'configureHelp',
|
|
322
|
+
'allowExcessArguments',
|
|
323
|
+
'allowUnknownOption',
|
|
324
|
+
'enablePositionalOptions',
|
|
325
|
+
'passThroughOptions',
|
|
326
|
+
'storeOptionsAsProperties',
|
|
327
|
+
'copyInheritedSettings',
|
|
328
|
+
'combineFlagAndOptionalValue',
|
|
329
|
+
];
|
|
330
|
+
export function isSafeFluentMethod(methodName) {
|
|
331
|
+
return SAFE_FLUENT_METHOD_NAMES.includes(methodName);
|
|
332
|
+
}
|
|
333
|
+
//# sourceMappingURL=null-safety-prefixes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-safety-prefixes.js","sourceRoot":"","sources":["../../../../src/checks/quality/data-integrity/null-safety-prefixes.ts"],"names":[],"mappings":"AAAA;;GAEG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