@hailstails/hone 1.5.0 → 2.0.0-pre.2
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/ADOPTING.md +104 -199
- package/CHANGELOG.md +138 -0
- package/MIGRATING.md +92 -47
- package/README.md +95 -244
- package/chunks/chunk-5HRMJ4O2.js +608 -0
- package/chunks/chunk-5U4JMWNV.js +9 -0
- package/chunks/{chunk-2O46EB4E.js → chunk-ASUN4AVC.js} +25 -12
- package/chunks/chunk-DGOLOS5A.js +9 -0
- package/chunks/{chunk-HJA4CX7C.js → chunk-FBZBSDED.js} +1 -1
- package/chunks/{chunk-Y2KPZDDV.js → chunk-GNOMK7CR.js} +201 -98
- package/chunks/chunk-IX2VZTBO.js +887 -0
- package/chunks/{chunk-QWA6OVLC.js → chunk-K2W3D3NB.js} +8 -2
- package/chunks/chunk-L7BGRC6D.js +22 -0
- package/chunks/chunk-M6SOGWT7.js +82 -0
- package/chunks/chunk-MWLBA4B3.js +849 -0
- package/chunks/chunk-NRIQD3PI.js +38 -0
- package/chunks/chunk-OKLYWD2Z.js +823 -0
- package/chunks/{chunk-3HFJHJDO.js → chunk-QP5TLOBY.js} +17 -8
- package/chunks/chunk-R75QELTA.js +481 -0
- package/chunks/chunk-RANAKCTW.js +31 -0
- package/chunks/{chunk-NA5L6PUE.js → chunk-RANIXNWY.js} +1 -2
- package/chunks/chunk-RFR3ITBS.js +9 -0
- package/chunks/{chunk-Z4UBS7WI.js → chunk-RGSHTPLA.js} +26 -7
- package/chunks/{chunk-T32FOWZA.js → chunk-TNY2PASL.js} +14 -18
- package/chunks/{chunk-Y4SMWOD2.js → chunk-UJONWHA4.js} +2 -2
- package/chunks/{chunk-WF3PPYRR.js → chunk-VYBO2Q65.js} +4 -2
- package/chunks/chunk-Z6JHBNDS.js +15 -0
- package/chunks/eslint-10-boundary-A4JIQ734.js +14 -0
- package/chunks/eslint-9-boundary-CL5DDBHX.js +34 -0
- package/docs/adding-a-discipline-or-mechanism.md +21 -19
- package/docs/extending.md +5 -5
- package/docs/output-contract.md +700 -14
- package/docs/why-chain-contract.md +6 -6
- package/methods/README.md +2 -2
- package/methods/assessment-template.md +1 -1
- package/methods/lenses/clean-architecture.md +19 -54
- package/methods/lenses/decomposition.md +7 -7
- package/methods/lenses/defended-on-intent.md +4 -4
- package/methods/lenses/di-discipline.md +8 -8
- package/methods/lenses/errors-as-data.md +6 -6
- package/methods/lenses/function-first.md +9 -9
- package/methods/lenses/naming.md +6 -6
- package/methods/lenses/test-discipline.md +8 -8
- package/methods/lenses/type-soundness.md +6 -6
- package/methods/lenses/zod-boundary.md +9 -9
- package/package.json +30 -28
- package/rules/README.md +268 -4
- package/rules/SPIRIT.md +1 -1
- package/rules/cases/a-value-is-one-of-several-kinds-or-states.md +20 -0
- package/rules/cases/an-adopter-is-not-handed-our-risk.md +17 -0
- package/rules/cases/an-operation-can-fail.md +20 -0
- package/rules/cases/builds-the-real-implementations.md +25 -0
- package/rules/cases/causes-an-effect.md +26 -0
- package/rules/cases/checks-a-value-that-may-be-one-of-several-outcomes.md +20 -0
- package/rules/cases/checks-conditions-before-its-work.md +20 -0
- package/rules/cases/coordinates-other-units.md +20 -0
- package/rules/cases/does-one-job.md +23 -0
- package/rules/cases/explains-something-in-prose.md +20 -0
- package/rules/cases/gives-a-value-its-type.md +26 -0
- package/rules/cases/gives-each-unit-its-test.md +20 -0
- package/rules/cases/keeps-state-or-settings-across-calls.md +20 -0
- package/rules/cases/makes-a-new-value-from-what-it-has.md +17 -0
- package/rules/cases/names-something.md +20 -0
- package/rules/cases/needs-the-current-time-a-random-value-a-new-id-or-an-outside-ordering.md +26 -0
- package/rules/cases/puts-code-in-a-file-or-folder.md +20 -0
- package/rules/cases/reads-data-from-outside.md +23 -0
- package/rules/cases/reuses-behaviour-from-another-unit-or-type.md +20 -0
- package/rules/cases/sends-data-out-of-the-program.md +20 -0
- package/rules/cases/sets-how-strictly-the-checker-works.md +14 -0
- package/rules/cases/ships-code-for-others.md +17 -0
- package/rules/cases/states-what-the-unit-gives-back-for-one-case-or-several.md +20 -0
- package/rules/cases/takes-an-outside-dependency.md +38 -0
- package/rules/cases/tests-across-units-or-against-a-real-system.md +20 -0
- package/rules/cases/uses-a-system-or-service-outside-the-program.md +29 -0
- package/rules/cases/uses-what-a-collaborator-gives-back.md +20 -0
- package/rules/cases/writes-basic-logic.md +17 -0
- package/rules/cases.md +36 -59
- package/rules/numbers.md +121 -121
- package/rules/principles/external-behaviour-sits-at-a-boundary.md +12 -0
- package/rules/principles/no-hidden-effects.md +17 -0
- package/rules/principles/no-leak-across-a-boundary.md +19 -0
- package/rules/principles/one-place-decides.md +12 -0
- package/rules/principles/our-code-reads-in-the-common-language.md +12 -0
- package/rules/principles/outside-risk-is-carried-on-purpose.md +13 -0
- package/rules/principles/tests-are-ours.md +12 -0
- package/rules/principles/the-type-checker-proves-it.md +12 -0
- package/rules/principles.md +50 -46
- package/rules/record-kinds/authorised-location.md +26 -0
- package/rules/record-kinds/boundary-record.md +9 -0
- package/rules/record-kinds/debt.md +23 -0
- package/rules/record-kinds/dependency-record.md +9 -0
- package/rules/record-kinds/deviation.md +9 -0
- package/rules/records.md +17 -30
- package/rules/rules/declared-not-asserted.md +16 -0
- package/rules/rules/doer-or-orchestrator.md +16 -0
- package/rules/rules/failures-are-values.md +15 -0
- package/rules/rules/fixed-versions.md +11 -0
- package/rules/rules/guard-first.md +14 -0
- package/rules/rules/handed-what-it-uses.md +16 -0
- package/rules/rules/kinds-are-named.md +16 -0
- package/rules/rules/one-reason-per-module.md +18 -0
- package/rules/rules/one-word-everywhere.md +19 -0
- package/rules/rules/outside-dependencies-justified.md +14 -0
- package/rules/rules/outside-dependencies-stay-at-boundaries.md +18 -0
- package/rules/rules/ports-declared-inside.md +22 -0
- package/rules/rules/shipped-risk-declared.md +11 -0
- package/rules/rules/straight-through-tests.md +15 -0
- package/rules/rules/tested-where-its-owned.md +20 -0
- package/rules/rules/tools-live-in-the-repo.md +11 -0
- package/rules/rules/upstream-stays-untouched.md +11 -0
- package/rules/rules/written-out-answers.md +17 -0
- package/rules/rules.md +117 -81
- package/rules/typescript/checks.md +1668 -202
- package/rules/typescript/recipes/adapter-per-outside-party.md +18 -0
- package/rules/typescript/recipes/assert-to-narrow.md +18 -0
- package/rules/typescript/recipes/bounded-context-generic.md +19 -0
- package/rules/typescript/recipes/closure-factory.md +20 -0
- package/rules/typescript/recipes/companion-test-file.md +18 -0
- package/rules/typescript/recipes/composed-orchestrator.md +18 -0
- package/rules/typescript/recipes/composition-root.md +18 -0
- package/rules/typescript/recipes/copy-never-write-in.md +18 -0
- package/rules/typescript/recipes/declared-not-bundled.md +17 -0
- package/rules/typescript/recipes/dependency-record.md +20 -0
- package/rules/typescript/recipes/domain-vocabulary-list.md +18 -0
- package/rules/typescript/recipes/entity-module.md +20 -0
- package/rules/typescript/recipes/exact-pins-and-a-lock-file.md +18 -0
- package/rules/typescript/recipes/extension-outside-the-vendored-code.md +18 -0
- package/rules/typescript/recipes/failure-asserted-as-a-value.md +18 -0
- package/rules/typescript/recipes/failure-mapping-at-the-adapter.md +20 -0
- package/rules/typescript/recipes/fix-the-declaration-not-the-value.md +18 -0
- package/rules/typescript/recipes/functional-iteration.md +18 -0
- package/rules/typescript/recipes/guard-clauses.md +18 -0
- package/rules/typescript/recipes/integration-test-owns-its-scratch.md +18 -0
- package/rules/typescript/recipes/integration-test-suffix.md +18 -0
- package/rules/typescript/recipes/iteach-over-typed-rows.md +18 -0
- package/rules/typescript/recipes/map-out-at-the-adapter.md +18 -0
- package/rules/typescript/recipes/meaning-in-names-not-comments.md +22 -0
- package/rules/typescript/recipes/named-exported-type.md +18 -0
- package/rules/typescript/recipes/narrow-ports.md +18 -0
- package/rules/typescript/recipes/one-argument-object.md +19 -0
- package/rules/typescript/recipes/port-in-the-domain.md +19 -0
- package/rules/typescript/recipes/ports-in-the-argument.md +18 -0
- package/rules/typescript/recipes/repo-scripts-only.md +18 -0
- package/rules/typescript/recipes/result-union.md +22 -0
- package/rules/typescript/recipes/screaming-folders.md +20 -0
- package/rules/typescript/recipes/shared-strict-base-config.md +20 -0
- package/rules/typescript/recipes/stub-with-vifn.md +20 -0
- package/rules/typescript/recipes/tagged-union-and-exhaustive-switch.md +18 -0
- package/rules/typescript/recipes/whole-words.md +18 -0
- package/rules/typescript/recipes/whole-written-out-expectation.md +18 -0
- package/rules/typescript/recipes/world-values-through-a-port.md +18 -0
- package/rules/typescript/recipes/zod-at-the-producers-adapter.md +19 -0
- package/rules/typescript/recipes.md +247 -218
- package/rules/typescript/symptoms/absence-standing-for-a-state.md +36 -0
- package/rules/typescript/symptoms/adapter-built-outside-the-root.md +30 -0
- package/rules/typescript/symptoms/ambient-randomness.md +36 -0
- package/rules/typescript/symptoms/answer-set-in-a-hook.md +45 -0
- package/rules/typescript/symptoms/authored-class-or-this/class-keyword.md +30 -0
- package/rules/typescript/symptoms/authored-class-or-this/static-members-only.md +18 -0
- package/rules/typescript/symptoms/authored-class-or-this.md +49 -0
- package/rules/typescript/symptoms/behaviour-tested-away-from-its-owner.md +44 -0
- package/rules/typescript/symptoms/boolean-in-a-signature/boolean-annotation.md +30 -0
- package/rules/typescript/symptoms/boolean-in-a-signature.md +43 -0
- package/rules/typescript/symptoms/branch-in-a-test/test-body.md +213 -0
- package/rules/typescript/symptoms/branch-in-a-test.md +48 -0
- package/rules/typescript/symptoms/bundled-dependency.md +28 -0
- package/rules/typescript/symptoms/catch-all-failure-kind.md +37 -0
- package/rules/typescript/symptoms/change-spread-across-modules.md +27 -0
- package/rules/typescript/symptoms/claimed-type/cast-to-any.md +29 -0
- package/rules/typescript/symptoms/claimed-type/non-null-assertions.md +34 -0
- package/rules/typescript/symptoms/claimed-type/unlisted-cast-site.md +34 -0
- package/rules/typescript/symptoms/claimed-type.md +56 -0
- package/rules/typescript/symptoms/computed-value-in-a-test/test-body.md +144 -0
- package/rules/typescript/symptoms/computed-value-in-a-test.md +36 -0
- package/rules/typescript/symptoms/coverage-gate.md +27 -0
- package/rules/typescript/symptoms/date-used-directly/clock-sources.md +31 -0
- package/rules/typescript/symptoms/date-used-directly.md +46 -0
- package/rules/typescript/symptoms/default-for-a-required-value.md +45 -0
- package/rules/typescript/symptoms/default-on-a-closed-union/default-arm.md +32 -0
- package/rules/typescript/symptoms/default-on-a-closed-union.md +32 -0
- package/rules/typescript/symptoms/dependency-without-a-record.md +33 -0
- package/rules/typescript/symptoms/doer-calling-our-own-unit.md +36 -0
- package/rules/typescript/symptoms/double-with-a-body/logic-in-a-passed-function.md +32 -0
- package/rules/typescript/symptoms/double-with-a-body/stub-implementation.md +31 -0
- package/rules/typescript/symptoms/double-with-a-body.md +55 -0
- package/rules/typescript/symptoms/drawer-path/drawer-names.md +28 -0
- package/rules/typescript/symptoms/drawer-path.md +32 -0
- package/rules/typescript/symptoms/duplicate-decision.md +36 -0
- package/rules/typescript/symptoms/edit-inside-vendored-code.md +33 -0
- package/rules/typescript/symptoms/failure-shaped-as-success.md +28 -0
- package/rules/typescript/symptoms/floating-version.md +27 -0
- package/rules/typescript/symptoms/inherited-environment-in-a-subprocess/git-spawn-environment.md +30 -0
- package/rules/typescript/symptoms/inherited-environment-in-a-subprocess.md +33 -0
- package/rules/typescript/symptoms/inner-layer-imports-outer.md +33 -0
- package/rules/typescript/symptoms/integration-heavy-suite.md +29 -0
- package/rules/typescript/symptoms/large-input-for-a-few-fields.md +37 -0
- package/rules/typescript/symptoms/library-class-built-in-place.md +42 -0
- package/rules/typescript/symptoms/long-function/function-length.md +47 -0
- package/rules/typescript/symptoms/long-function.md +75 -0
- package/rules/typescript/symptoms/loop-keyword/loop-statement.md +34 -0
- package/rules/typescript/symptoms/loop-keyword.md +49 -0
- package/rules/typescript/symptoms/machine-touched-in-a-unit-test.md +40 -0
- package/rules/typescript/symptoms/many-spellings-of-one-concept.md +29 -0
- package/rules/typescript/symptoms/module-level-state.md +30 -0
- package/rules/typescript/symptoms/module-or-global-patched/module-mock-call.md +29 -0
- package/rules/typescript/symptoms/module-or-global-patched.md +38 -0
- package/rules/typescript/symptoms/name-off-its-casing/filename-case.md +16 -0
- package/rules/typescript/symptoms/name-off-its-casing/naming-convention.md +20 -0
- package/rules/typescript/symptoms/name-off-its-casing.md +31 -0
- package/rules/typescript/symptoms/no-lock-file.md +27 -0
- package/rules/typescript/symptoms/orchestrator-that-computes.md +27 -0
- package/rules/typescript/symptoms/outside-dependency-vocabulary-for-basic-logic.md +33 -0
- package/rules/typescript/symptoms/outside-import-past-a-boundary/import-or-require.md +44 -0
- package/rules/typescript/symptoms/outside-import-past-a-boundary.md +45 -0
- package/rules/typescript/symptoms/outside-type-in-a-signature.md +37 -0
- package/rules/typescript/symptoms/own-type-guard.md +36 -0
- package/rules/typescript/symptoms/port-named-for-a-mechanism.md +34 -0
- package/rules/typescript/symptoms/port-outside-the-domain.md +28 -0
- package/rules/typescript/symptoms/positional-parameters/parameter-count.md +30 -0
- package/rules/typescript/symptoms/positional-parameters.md +43 -0
- package/rules/typescript/symptoms/process-global-used-in-place.md +53 -0
- package/rules/typescript/symptoms/prose-in-code.md +27 -0
- package/rules/typescript/symptoms/rebinding/parameter-reassignment.md +18 -0
- package/rules/typescript/symptoms/rebinding/test-body.md +32 -0
- package/rules/typescript/symptoms/rebinding.md +36 -0
- package/rules/typescript/symptoms/schema-past-its-adapter.md +41 -0
- package/rules/typescript/symptoms/shorthand-name/identifier-names.md +29 -0
- package/rules/typescript/symptoms/shorthand-name.md +32 -0
- package/rules/typescript/symptoms/strictness-weakened/exact-optional-property-types.md +51 -0
- package/rules/typescript/symptoms/strictness-weakened/no-fallthrough-cases-in-switch.md +51 -0
- package/rules/typescript/symptoms/strictness-weakened/no-implicit-override.md +51 -0
- package/rules/typescript/symptoms/strictness-weakened/no-property-access-from-index-signature.md +51 -0
- package/rules/{CD-3/CHECKS.md → typescript/symptoms/strictness-weakened/no-unchecked-indexed-access.md} +23 -40
- package/rules/typescript/symptoms/strictness-weakened/strict.md +51 -0
- package/rules/typescript/symptoms/strictness-weakened/use-unknown-in-catch-variables.md +51 -0
- package/rules/typescript/symptoms/strictness-weakened.md +32 -0
- package/rules/typescript/symptoms/tangled-function/cognitive-complexity.md +42 -0
- package/rules/typescript/symptoms/tangled-function.md +75 -0
- package/rules/typescript/symptoms/test-of-the-type-checker.md +24 -0
- package/rules/typescript/symptoms/test-switched-off/focused-tests.md +15 -0
- package/rules/typescript/symptoms/test-switched-off/skipped-tests.md +15 -0
- package/rules/typescript/symptoms/test-switched-off.md +25 -0
- package/rules/typescript/symptoms/text-past-its-reader/test-body.md +30 -0
- package/rules/typescript/symptoms/text-past-its-reader.md +71 -0
- package/rules/typescript/symptoms/throw-between-our-units.md +46 -0
- package/rules/typescript/symptoms/throw-or-catch-in-a-test/throw-statement.md +32 -0
- package/rules/typescript/symptoms/throw-or-catch-in-a-test/try-block.md +39 -0
- package/rules/typescript/symptoms/throw-or-catch-in-a-test.md +35 -0
- package/rules/typescript/symptoms/thrown-non-error/throw-only-error.md +15 -0
- package/rules/typescript/symptoms/thrown-non-error.md +27 -0
- package/rules/typescript/symptoms/tool-fetched-at-run-time.md +27 -0
- package/rules/typescript/symptoms/tuple-as-data.md +29 -0
- package/rules/typescript/symptoms/type-derived-from-code/factory-return-types.md +29 -0
- package/rules/typescript/symptoms/type-derived-from-code.md +41 -0
- package/rules/typescript/symptoms/types-only-file.md +36 -0
- package/rules/typescript/symptoms/unasserted-call.md +29 -0
- package/rules/typescript/symptoms/unit-without-a-running-test/companion-test-file.md +28 -0
- package/rules/typescript/symptoms/unit-without-a-running-test.md +28 -0
- package/rules/{CD-5/CHECKS.md → typescript/symptoms/untracked-escape/directive-pointers.md} +12 -25
- package/rules/typescript/symptoms/untracked-escape.md +32 -0
- package/rules/typescript/symptoms/untyped-value/explicit-any.md +14 -0
- package/rules/typescript/symptoms/untyped-value/implicit-any-let.md +14 -0
- package/rules/typescript/symptoms/untyped-value.md +36 -0
- package/rules/typescript/symptoms/wide-input.md +37 -0
- package/rules/typescript/symptoms/wide-port.md +32 -0
- package/rules/typescript/symptoms/work-inside-a-condition/else-after-an-exit.md +40 -0
- package/rules/typescript/symptoms/work-inside-a-condition.md +41 -0
- package/rules/typescript/symptoms/write-into-a-parameter/parameter-mutation.md +33 -0
- package/rules/typescript/symptoms/write-into-a-parameter.md +34 -0
- package/rules/typescript/symptoms.md +623 -414
- package/{core → src/application}/conformance/conformance-testing-types.d.ts +16 -6
- package/src/audit.d.ts +20 -0
- package/{api → src}/audit.js +6 -5
- package/{core/rule-set-reader → src/domain/rule-set}/authored-rule-set-types.d.ts +2 -2
- package/{core/values → src/domain/rule-set}/edition-types.d.ts +3 -3
- package/{core/values → src/domain/rule-set}/identifier-types.d.ts +2 -2
- package/{core/conformance → src/domain/runner}/conformance-types.d.ts +1 -1
- package/{core/mechanism-port → src/domain/runner}/piece-failure-types.d.ts +1 -1
- package/{core/mechanism-port → src/domain/runner}/runner-module-types.d.ts +4 -4
- package/src/domain/runner/runner-result-types.d.ts +88 -0
- package/src/eslint-plugin.d.ts +16 -0
- package/src/eslint-plugin.js +72 -0
- package/src/hone.js +13563 -0
- package/src/infrastructure/disciplines-file/version-one-names.json +634 -0
- package/src/infrastructure/engines/eslint/authored-class-or-this/class-keyword/class-keyword.examples.json +84 -0
- package/{mechanisms/eslint/CD-14/cd14/cd14.eslint-plugin.js → src/infrastructure/engines/eslint/authored-class-or-this/class-keyword/eslint-plugin.js} +9 -10
- package/src/infrastructure/engines/eslint/authored-class-or-this/class-keyword/piece.json +12 -0
- package/src/infrastructure/engines/eslint/authored-class-or-this/static-members-only/piece.json +24 -0
- package/src/infrastructure/engines/eslint/authored-class-or-this/static-members-only/static-members-only.examples.json +36 -0
- package/src/infrastructure/engines/eslint/claimed-type/non-null-assertions/eslint-plugin.js +16 -0
- package/src/infrastructure/engines/eslint/claimed-type/non-null-assertions/non-null-assertions.examples.json +48 -0
- package/src/infrastructure/engines/eslint/claimed-type/non-null-assertions/piece.json +22 -0
- package/src/infrastructure/engines/eslint/long-function/function-length/function-length.examples.json +42 -0
- package/src/infrastructure/engines/eslint/long-function/function-length/piece.json +16 -0
- package/{mechanisms/eslint/CD-7/cd7/cd7.eslint-plugin.js → src/infrastructure/engines/eslint/name-off-its-casing/filename-case/eslint-plugin.js} +5 -4
- package/src/infrastructure/engines/eslint/name-off-its-casing/filename-case/filename-case.examples.json +60 -0
- package/src/infrastructure/engines/eslint/name-off-its-casing/filename-case/piece.json +11 -0
- package/src/infrastructure/engines/eslint/name-off-its-casing/naming-convention/eslint-plugin.js +16 -0
- package/src/infrastructure/engines/eslint/name-off-its-casing/naming-convention/naming-convention.examples.json +78 -0
- package/src/infrastructure/engines/eslint/name-off-its-casing/naming-convention/piece.json +214 -0
- package/src/infrastructure/engines/eslint/positional-parameters/parameter-count/eslint-plugin.js +16 -0
- package/src/infrastructure/engines/eslint/positional-parameters/parameter-count/parameter-count.examples.json +30 -0
- package/src/infrastructure/engines/eslint/positional-parameters/parameter-count/piece.json +18 -0
- package/src/infrastructure/engines/eslint/rebinding/parameter-reassignment/eslint-plugin.js +16 -0
- package/src/infrastructure/engines/eslint/rebinding/parameter-reassignment/parameter-reassignment.examples.json +30 -0
- package/src/infrastructure/engines/eslint/rebinding/parameter-reassignment/piece.json +17 -0
- package/{mechanisms → src/infrastructure/engines}/eslint/runner/README.md +5 -5
- package/{mechanisms/eslint/runner → src/infrastructure/engines/eslint/runner/pieces}/eslint-piece-settings-types.d.ts +1 -1
- package/{mechanisms → src/infrastructure/engines}/eslint/runner/runner.js +2186 -1372
- package/{mechanisms/eslint/CD-41 → src/infrastructure/engines/eslint/tangled-function/cognitive-complexity}/README.md +1 -1
- package/src/infrastructure/engines/eslint/tangled-function/cognitive-complexity/cognitive-complexity.examples.json +48 -0
- package/{mechanisms/eslint/CD-41/cd41/cd41.eslint-plugin.js → src/infrastructure/engines/eslint/tangled-function/cognitive-complexity/eslint-plugin.js} +58 -14
- package/src/infrastructure/engines/eslint/tangled-function/cognitive-complexity/piece.json +12 -0
- package/{mechanisms/eslint/CD-27/cd27/cd27.eslint-plugin.js → src/infrastructure/engines/eslint/test-switched-off/focused-tests/eslint-plugin.js} +5 -4
- package/src/infrastructure/engines/eslint/test-switched-off/focused-tests/focused-tests.examples.json +60 -0
- package/src/infrastructure/engines/eslint/test-switched-off/focused-tests/piece.json +12 -0
- package/src/infrastructure/engines/eslint/test-switched-off/skipped-tests/piece.json +16 -0
- package/src/infrastructure/engines/eslint/test-switched-off/skipped-tests/skipped-tests.examples.json +54 -0
- package/{mechanisms/eslint/CD-10/cd10/cd10.eslint-plugin.js → src/infrastructure/engines/eslint/thrown-non-error/throw-only-error/eslint-plugin.js} +5 -4
- package/src/infrastructure/engines/eslint/thrown-non-error/throw-only-error/piece.json +12 -0
- package/src/infrastructure/engines/eslint/thrown-non-error/throw-only-error/throw-only-error.examples.json +54 -0
- package/{mechanisms/eslint/CD-1/cd1/cd1.eslint-plugin.js → src/infrastructure/engines/eslint/untyped-value/explicit-any/eslint-plugin.js} +14 -9
- package/src/infrastructure/engines/eslint/untyped-value/explicit-any/explicit-any.examples.json +36 -0
- package/src/infrastructure/engines/eslint/untyped-value/explicit-any/piece.json +12 -0
- package/src/infrastructure/engines/eslint/untyped-value/implicit-any-let/implicit-any-let.examples.json +48 -0
- package/src/infrastructure/engines/eslint/untyped-value/implicit-any-let/piece.json +16 -0
- package/src/infrastructure/engines/eslint/work-inside-a-condition/else-after-an-exit/else-after-an-exit.examples.json +36 -0
- package/{mechanisms/eslint/CD-42/cd42/cd42.eslint-plugin.js → src/infrastructure/engines/eslint/work-inside-a-condition/else-after-an-exit/eslint-plugin.js} +29 -13
- package/src/infrastructure/engines/eslint/work-inside-a-condition/else-after-an-exit/piece.json +12 -0
- package/src/infrastructure/engines/walker/authored-class-or-this/class-keyword/class-keyword.examples.json +84 -0
- package/{mechanisms/audit/CD-14 → src/infrastructure/engines/walker/authored-class-or-this/class-keyword}/class-syntax.js +6 -3
- package/src/infrastructure/engines/walker/authored-class-or-this/class-keyword/piece.json +10 -0
- package/src/infrastructure/engines/walker/boolean-in-a-signature/boolean-annotation/boolean-annotation.examples.json +42 -0
- package/{mechanisms/audit/CD-43 → src/infrastructure/engines/walker/boolean-in-a-signature/boolean-annotation}/boolean-signatures.js +14 -6
- package/src/infrastructure/engines/walker/boolean-in-a-signature/boolean-annotation/piece.json +9 -0
- package/src/infrastructure/engines/walker/branch-in-a-test/test-body/piece.json +95 -0
- package/{mechanisms/audit/CD-27 → src/infrastructure/engines/walker/branch-in-a-test/test-body}/test-body-logic.js +183 -54
- package/src/infrastructure/engines/walker/branch-in-a-test/test-body/test-body.examples.json +280 -0
- package/{mechanisms/audit/CD-1 → src/infrastructure/engines/walker/claimed-type/cast-to-any}/any-cast.js +7 -4
- package/src/infrastructure/engines/walker/claimed-type/cast-to-any/cast-to-any.examples.json +48 -0
- package/src/infrastructure/engines/walker/claimed-type/cast-to-any/piece.json +9 -0
- package/{mechanisms/audit/CD-2 → src/infrastructure/engines/walker/claimed-type/unlisted-cast-site}/cast-expressions.js +13 -6
- package/src/infrastructure/engines/walker/claimed-type/unlisted-cast-site/piece.json +14 -0
- package/src/infrastructure/engines/walker/claimed-type/unlisted-cast-site/unlisted-cast-site.examples.json +54 -0
- package/src/infrastructure/engines/walker/computed-value-in-a-test/test-body/piece.json +18 -0
- package/src/infrastructure/engines/walker/date-used-directly/clock-sources/clock-sources.examples.json +30 -0
- package/src/infrastructure/engines/walker/date-used-directly/clock-sources/clock-sources.js +36 -0
- package/src/infrastructure/engines/walker/date-used-directly/clock-sources/piece.json +9 -0
- package/src/infrastructure/engines/walker/default-on-a-closed-union/default-arm/default-arm.examples.json +36 -0
- package/src/infrastructure/engines/walker/default-on-a-closed-union/default-arm/piece.json +9 -0
- package/src/infrastructure/engines/walker/default-on-a-closed-union/default-arm/switch-defaults.js +54 -0
- package/src/infrastructure/engines/walker/double-with-a-body/logic-in-a-passed-function/piece.json +18 -0
- package/{mechanisms/audit/CD-25 → src/infrastructure/engines/walker/double-with-a-body/stub-implementation}/dependency-isolation.js +8 -4
- package/src/infrastructure/engines/walker/double-with-a-body/stub-implementation/piece.json +9 -0
- package/src/infrastructure/engines/walker/double-with-a-body/stub-implementation/stub-implementation.examples.json +36 -0
- package/{mechanisms/audit/CD-7 → src/infrastructure/engines/walker/drawer-path/drawer-names}/categorical-paths.js +23 -8
- package/src/infrastructure/engines/walker/drawer-path/drawer-names/drawer-names.examples.json +42 -0
- package/src/infrastructure/engines/walker/drawer-path/drawer-names/piece.json +9 -0
- package/src/infrastructure/engines/walker/inherited-environment-in-a-subprocess/git-spawn-environment/git-spawn-environment.examples.json +36 -0
- package/{mechanisms/audit/CD-47 → src/infrastructure/engines/walker/inherited-environment-in-a-subprocess/git-spawn-environment}/hermetic-git-spawns.js +13 -4
- package/src/infrastructure/engines/walker/inherited-environment-in-a-subprocess/git-spawn-environment/piece.json +9 -0
- package/src/infrastructure/engines/walker/loop-keyword/loop-statement/loop-statement.examples.json +48 -0
- package/{mechanisms/audit/CD-15 → src/infrastructure/engines/walker/loop-keyword/loop-statement}/loops.js +12 -4
- package/src/infrastructure/engines/walker/loop-keyword/loop-statement/piece.json +9 -0
- package/src/infrastructure/engines/walker/module-or-global-patched/module-mock-call/module-mock-call.examples.json +36 -0
- package/{mechanisms/audit/CD-26 → src/infrastructure/engines/walker/module-or-global-patched/module-mock-call}/module-mocking.js +8 -4
- package/src/infrastructure/engines/walker/module-or-global-patched/module-mock-call/piece.json +9 -0
- package/src/infrastructure/engines/walker/outside-import-past-a-boundary/import-or-require/import-boundaries.js +133 -0
- package/src/infrastructure/engines/walker/outside-import-past-a-boundary/import-or-require/import-or-require.examples.json +42 -0
- package/src/infrastructure/engines/walker/outside-import-past-a-boundary/import-or-require/piece.json +14 -0
- package/src/infrastructure/engines/walker/rebinding/test-body/piece.json +18 -0
- package/{mechanisms/audit/runner → src/infrastructure/engines/walker/runner/pieces}/walker-piece.d.ts +8 -14
- package/{mechanisms/audit → src/infrastructure/engines/walker}/runner/runner.js +191 -120
- package/{mechanisms/audit/runner → src/infrastructure/engines/walker/runner/toolchain}/typescript-parse.d.ts +1 -0
- package/src/infrastructure/engines/walker/shorthand-name/identifier-names/identifier-names.examples.json +42 -0
- package/{mechanisms/audit/CD-6 → src/infrastructure/engines/walker/shorthand-name/identifier-names}/identifier-names.js +32 -15
- package/src/infrastructure/engines/walker/shorthand-name/identifier-names/piece.json +9 -0
- package/src/infrastructure/engines/walker/strictness-weakened/exact-optional-property-types/exact-optional-property-types.examples.json +71 -0
- package/src/infrastructure/engines/walker/strictness-weakened/exact-optional-property-types/piece.json +17 -0
- package/src/infrastructure/engines/walker/strictness-weakened/no-fallthrough-cases-in-switch/no-fallthrough-cases-in-switch.examples.json +71 -0
- package/src/infrastructure/engines/walker/strictness-weakened/no-fallthrough-cases-in-switch/piece.json +17 -0
- package/src/infrastructure/engines/walker/strictness-weakened/no-implicit-override/no-implicit-override.examples.json +71 -0
- package/src/infrastructure/engines/walker/strictness-weakened/no-implicit-override/piece.json +17 -0
- package/src/infrastructure/engines/walker/strictness-weakened/no-property-access-from-index-signature/no-property-access-from-index-signature.examples.json +71 -0
- package/src/infrastructure/engines/walker/strictness-weakened/no-property-access-from-index-signature/piece.json +17 -0
- package/src/infrastructure/engines/walker/strictness-weakened/no-unchecked-indexed-access/no-unchecked-indexed-access.examples.json +71 -0
- package/src/infrastructure/engines/walker/strictness-weakened/no-unchecked-indexed-access/piece.json +17 -0
- package/{mechanisms/audit/CD-3 → src/infrastructure/engines/walker/strictness-weakened/strict}/compiler-overrides.js +102 -38
- package/src/infrastructure/engines/walker/strictness-weakened/strict/piece.json +13 -0
- package/src/infrastructure/engines/walker/strictness-weakened/strict/strict.examples.json +64 -0
- package/src/infrastructure/engines/walker/strictness-weakened/use-unknown-in-catch-variables/piece.json +17 -0
- package/src/infrastructure/engines/walker/strictness-weakened/use-unknown-in-catch-variables/use-unknown-in-catch-variables.examples.json +71 -0
- package/src/infrastructure/engines/walker/text-past-its-reader/test-body/piece.json +18 -0
- package/src/infrastructure/engines/walker/throw-or-catch-in-a-test/throw-statement/piece.json +9 -0
- package/src/infrastructure/engines/walker/throw-or-catch-in-a-test/throw-statement/throw-statement.examples.json +36 -0
- package/{mechanisms/audit/CD-10 → src/infrastructure/engines/walker/throw-or-catch-in-a-test/throw-statement}/throws-in-tests.js +6 -3
- package/src/infrastructure/engines/walker/throw-or-catch-in-a-test/try-block/piece.json +18 -0
- package/src/infrastructure/engines/walker/type-derived-from-code/factory-return-types/factory-return-types.examples.json +36 -0
- package/{mechanisms/audit/CD-7a → src/infrastructure/engines/walker/type-derived-from-code/factory-return-types}/factory-return-types.js +5 -3
- package/src/infrastructure/engines/walker/type-derived-from-code/factory-return-types/piece.json +9 -0
- package/src/infrastructure/engines/walker/unit-without-a-running-test/companion-test-file/companion-test-file.examples.json +36 -0
- package/{mechanisms/audit/CD-23 → src/infrastructure/engines/walker/unit-without-a-running-test/companion-test-file}/export-test-sibling.js +7 -4
- package/src/infrastructure/engines/walker/unit-without-a-running-test/companion-test-file/piece.json +9 -0
- package/{mechanisms/audit/CD-5 → src/infrastructure/engines/walker/untracked-escape/directive-pointers}/comments-directives.js +40 -19
- package/src/infrastructure/engines/walker/untracked-escape/directive-pointers/directive-pointers.examples.json +96 -0
- package/src/infrastructure/engines/walker/untracked-escape/directive-pointers/piece.json +16 -0
- package/src/infrastructure/engines/walker/write-into-a-parameter/parameter-mutation/parameter-mutation.examples.json +42 -0
- package/{mechanisms/audit/CD-44 → src/infrastructure/engines/walker/write-into-a-parameter/parameter-mutation}/parameter-mutation.js +22 -7
- package/src/infrastructure/engines/walker/write-into-a-parameter/parameter-mutation/piece.json +9 -0
- package/src/rule-set.d.ts +4 -0
- package/src/testing.d.ts +7 -0
- package/src/testing.js +524 -0
- package/api/audit.d.ts +0 -20
- package/api/rule-set.d.ts +0 -4
- package/api/testing.d.ts +0 -5
- package/api/testing.js +0 -238
- package/chunks/chunk-335ITLPO.js +0 -7
- package/chunks/chunk-5U4VTFD5.js +0 -1949
- package/chunks/chunk-E6VR3VRV.js +0 -268
- package/chunks/chunk-FR4FASVM.js +0 -108
- package/chunks/chunk-LDQUT742.js +0 -15
- package/chunks/chunk-MXSIQPCV.js +0 -13
- package/chunks/chunk-RWQ4UNKY.js +0 -24
- package/core/check/tool-command.js +0 -2909
- package/core/mechanism-port/runner-result-types.d.ts +0 -19
- package/mechanisms/audit/CD-1/piece.json +0 -13
- package/mechanisms/audit/CD-10/piece.json +0 -13
- package/mechanisms/audit/CD-14/piece.json +0 -13
- package/mechanisms/audit/CD-15/piece.json +0 -13
- package/mechanisms/audit/CD-17/clock-sources.js +0 -28
- package/mechanisms/audit/CD-17/piece.json +0 -13
- package/mechanisms/audit/CD-19/import-boundaries.js +0 -99
- package/mechanisms/audit/CD-19/piece.json +0 -18
- package/mechanisms/audit/CD-2/piece.json +0 -18
- package/mechanisms/audit/CD-23/piece.json +0 -13
- package/mechanisms/audit/CD-25/piece.json +0 -13
- package/mechanisms/audit/CD-26/piece.json +0 -13
- package/mechanisms/audit/CD-27/piece.json +0 -17
- package/mechanisms/audit/CD-3/piece.json +0 -77
- package/mechanisms/audit/CD-43/piece.json +0 -13
- package/mechanisms/audit/CD-44/piece.json +0 -13
- package/mechanisms/audit/CD-47/piece.json +0 -13
- package/mechanisms/audit/CD-5/piece.json +0 -20
- package/mechanisms/audit/CD-6/piece.json +0 -13
- package/mechanisms/audit/CD-7/piece.json +0 -13
- package/mechanisms/audit/CD-7a/piece.json +0 -13
- package/mechanisms/audit/CD-8/piece.json +0 -13
- package/mechanisms/audit/CD-8/switch-defaults.js +0 -42
- package/mechanisms/eslint/CD-1/piece.json +0 -23
- package/mechanisms/eslint/CD-10/piece.json +0 -15
- package/mechanisms/eslint/CD-14/piece.json +0 -31
- package/mechanisms/eslint/CD-2/cd2/cd2.eslint-plugin.js +0 -15
- package/mechanisms/eslint/CD-2/piece.json +0 -25
- package/mechanisms/eslint/CD-27/piece.json +0 -23
- package/mechanisms/eslint/CD-40/cd40/cd40.eslint-plugin.js +0 -15
- package/mechanisms/eslint/CD-40/piece.json +0 -21
- package/mechanisms/eslint/CD-41/piece.json +0 -23
- package/mechanisms/eslint/CD-42/piece.json +0 -15
- package/mechanisms/eslint/CD-44/cd44/cd44.eslint-plugin.js +0 -15
- package/mechanisms/eslint/CD-44/piece.json +0 -20
- package/mechanisms/eslint/CD-6/cd6/cd6.eslint-plugin.js +0 -15
- package/mechanisms/eslint/CD-6/piece.json +0 -217
- package/mechanisms/eslint/CD-7/piece.json +0 -15
- package/rules/CD-1/CHECKS.md +0 -41
- package/rules/CD-1/README.md +0 -15
- package/rules/CD-1/discipline.json +0 -195
- package/rules/CD-10/CHECKS.md +0 -51
- package/rules/CD-10/README.md +0 -15
- package/rules/CD-10/discipline.json +0 -133
- package/rules/CD-11/CHECKS.md +0 -15
- package/rules/CD-11/README.md +0 -15
- package/rules/CD-11/discipline.json +0 -12
- package/rules/CD-12/CHECKS.md +0 -15
- package/rules/CD-12/README.md +0 -15
- package/rules/CD-12/discipline.json +0 -12
- package/rules/CD-13/CHECKS.md +0 -15
- package/rules/CD-13/README.md +0 -15
- package/rules/CD-13/discipline.json +0 -12
- package/rules/CD-14/CHECKS.md +0 -51
- package/rules/CD-14/README.md +0 -15
- package/rules/CD-14/discipline.json +0 -173
- package/rules/CD-15/CHECKS.md +0 -44
- package/rules/CD-15/README.md +0 -15
- package/rules/CD-15/discipline.json +0 -73
- package/rules/CD-16/CHECKS.md +0 -9
- package/rules/CD-16/README.md +0 -15
- package/rules/CD-17/CHECKS.md +0 -39
- package/rules/CD-17/README.md +0 -15
- package/rules/CD-17/discipline.json +0 -51
- package/rules/CD-18/CHECKS.md +0 -15
- package/rules/CD-18/README.md +0 -15
- package/rules/CD-18/discipline.json +0 -12
- package/rules/CD-19/CHECKS.md +0 -51
- package/rules/CD-19/README.md +0 -15
- package/rules/CD-19/discipline.json +0 -63
- package/rules/CD-2/CHECKS.md +0 -60
- package/rules/CD-2/README.md +0 -15
- package/rules/CD-2/discipline.json +0 -151
- package/rules/CD-20/CHECKS.md +0 -9
- package/rules/CD-20/README.md +0 -15
- package/rules/CD-21/CHECKS.md +0 -15
- package/rules/CD-21/README.md +0 -15
- package/rules/CD-21/discipline.json +0 -12
- package/rules/CD-22/CHECKS.md +0 -15
- package/rules/CD-22/README.md +0 -15
- package/rules/CD-22/discipline.json +0 -12
- package/rules/CD-23/CHECKS.md +0 -37
- package/rules/CD-23/README.md +0 -15
- package/rules/CD-23/discipline.json +0 -57
- package/rules/CD-24/CHECKS.md +0 -9
- package/rules/CD-24/README.md +0 -15
- package/rules/CD-25/CHECKS.md +0 -40
- package/rules/CD-25/README.md +0 -15
- package/rules/CD-25/discipline.json +0 -57
- package/rules/CD-26/CHECKS.md +0 -38
- package/rules/CD-26/README.md +0 -15
- package/rules/CD-26/discipline.json +0 -57
- package/rules/CD-27/CHECKS.md +0 -460
- package/rules/CD-27/README.md +0 -15
- package/rules/CD-27/discipline.json +0 -437
- package/rules/CD-28/CHECKS.md +0 -15
- package/rules/CD-28/README.md +0 -15
- package/rules/CD-28/discipline.json +0 -12
- package/rules/CD-29/CHECKS.md +0 -15
- package/rules/CD-29/README.md +0 -15
- package/rules/CD-29/discipline.json +0 -12
- package/rules/CD-3/README.md +0 -15
- package/rules/CD-3/discipline.json +0 -641
- package/rules/CD-30/CHECKS.md +0 -15
- package/rules/CD-30/README.md +0 -15
- package/rules/CD-30/discipline.json +0 -12
- package/rules/CD-31/CHECKS.md +0 -15
- package/rules/CD-31/README.md +0 -15
- package/rules/CD-31/discipline.json +0 -12
- package/rules/CD-32/CHECKS.md +0 -15
- package/rules/CD-32/README.md +0 -26
- package/rules/CD-32/discipline.json +0 -12
- package/rules/CD-33/CHECKS.md +0 -15
- package/rules/CD-33/README.md +0 -26
- package/rules/CD-33/discipline.json +0 -12
- package/rules/CD-34/CHECKS.md +0 -15
- package/rules/CD-34/README.md +0 -25
- package/rules/CD-34/discipline.json +0 -12
- package/rules/CD-39/CHECKS.md +0 -15
- package/rules/CD-39/README.md +0 -26
- package/rules/CD-39/discipline.json +0 -12
- package/rules/CD-4/CHECKS.md +0 -15
- package/rules/CD-4/README.md +0 -15
- package/rules/CD-4/discipline.json +0 -12
- package/rules/CD-40/CHECKS.md +0 -41
- package/rules/CD-40/README.md +0 -15
- package/rules/CD-40/discipline.json +0 -58
- package/rules/CD-41/CHECKS.md +0 -66
- package/rules/CD-41/README.md +0 -15
- package/rules/CD-41/discipline.json +0 -138
- package/rules/CD-42/CHECKS.md +0 -49
- package/rules/CD-42/README.md +0 -15
- package/rules/CD-42/discipline.json +0 -61
- package/rules/CD-43/CHECKS.md +0 -39
- package/rules/CD-43/README.md +0 -15
- package/rules/CD-43/discipline.json +0 -65
- package/rules/CD-44/CHECKS.md +0 -50
- package/rules/CD-44/README.md +0 -15
- package/rules/CD-44/discipline.json +0 -111
- package/rules/CD-45/CHECKS.md +0 -15
- package/rules/CD-45/README.md +0 -15
- package/rules/CD-45/discipline.json +0 -12
- package/rules/CD-46/CHECKS.md +0 -9
- package/rules/CD-46/README.md +0 -27
- package/rules/CD-47/CHECKS.md +0 -39
- package/rules/CD-47/README.md +0 -15
- package/rules/CD-47/discipline.json +0 -57
- package/rules/CD-5/README.md +0 -15
- package/rules/CD-5/discipline.json +0 -131
- package/rules/CD-6/CHECKS.md +0 -53
- package/rules/CD-6/README.md +0 -15
- package/rules/CD-6/discipline.json +0 -165
- package/rules/CD-7/CHECKS.md +0 -48
- package/rules/CD-7/README.md +0 -15
- package/rules/CD-7/discipline.json +0 -142
- package/rules/CD-7a/CHECKS.md +0 -40
- package/rules/CD-7a/README.md +0 -15
- package/rules/CD-7a/discipline.json +0 -57
- package/rules/CD-8/CHECKS.md +0 -44
- package/rules/CD-8/README.md +0 -15
- package/rules/CD-8/discipline.json +0 -57
- package/rules/CD-9/CHECKS.md +0 -15
- package/rules/CD-9/README.md +0 -15
- package/rules/CD-9/discipline.json +0 -12
- package/rules/typescript/symptoms.json +0 -1005
- /package/{core/values → src/domain/finding}/anchor.d.ts +0 -0
- /package/{core/values → src/domain/repository}/branded.d.ts +0 -0
- /package/{core/values → src/domain/repository}/repo-path-types.d.ts +0 -0
- /package/{core/values → src/domain}/result.d.ts +0 -0
- /package/{core/values → src/domain/rule-set}/clause-address-types.d.ts +0 -0
- /package/{core/values → src/domain/settings/json-values}/json-value.d.ts +0 -0
- /package/{mechanisms/eslint/CD-14 → src/infrastructure/engines/eslint/authored-class-or-this/class-keyword}/README.md +0 -0
- /package/{mechanisms/eslint/CD-2 → src/infrastructure/engines/eslint/claimed-type/non-null-assertions}/README.md +0 -0
- /package/{mechanisms/eslint/CD-7 → src/infrastructure/engines/eslint/name-off-its-casing/filename-case}/README.md +0 -0
- /package/{mechanisms/eslint/CD-6 → src/infrastructure/engines/eslint/name-off-its-casing/naming-convention}/README.md +0 -0
- /package/{mechanisms/eslint/CD-40 → src/infrastructure/engines/eslint/positional-parameters/parameter-count}/README.md +0 -0
- /package/{mechanisms/eslint/CD-44 → src/infrastructure/engines/eslint/rebinding/parameter-reassignment}/README.md +0 -0
- /package/{mechanisms/eslint/CD-27 → src/infrastructure/engines/eslint/test-switched-off/focused-tests}/README.md +0 -0
- /package/{mechanisms/eslint/CD-10 → src/infrastructure/engines/eslint/thrown-non-error/throw-only-error}/README.md +0 -0
- /package/{mechanisms/eslint/CD-1 → src/infrastructure/engines/eslint/untyped-value/explicit-any}/README.md +0 -0
- /package/{mechanisms/eslint/CD-42 → src/infrastructure/engines/eslint/work-inside-a-condition/else-after-an-exit}/README.md +0 -0
- /package/{mechanisms/audit → src/infrastructure/engines/walker}/runner/README.md +0 -0
- /package/{api → src}/rule-set.js +0 -0
|
@@ -1,1005 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1,
|
|
3
|
-
"principles": [
|
|
4
|
-
{ "name": "tests-are-ours", "title": "Tests are ours" },
|
|
5
|
-
{ "name": "one-place-decides", "title": "One place decides" },
|
|
6
|
-
{ "name": "no-hidden-effects", "title": "No hidden effects" },
|
|
7
|
-
{ "name": "external-behaviour-sits-at-a-boundary", "title": "External behaviour sits at a boundary" },
|
|
8
|
-
{ "name": "no-leak-across-a-boundary", "title": "No leak across a boundary" },
|
|
9
|
-
{ "name": "the-type-checker-proves-it", "title": "The type checker proves it" },
|
|
10
|
-
{ "name": "our-code-reads-in-the-common-language", "title": "Our code reads in the common language" },
|
|
11
|
-
{ "name": "outside-risk-is-carried-on-purpose", "title": "Outside risk is carried on purpose" }
|
|
12
|
-
],
|
|
13
|
-
"rules": [
|
|
14
|
-
{ "name": "written-out-answers", "title": "Written-out answers", "principle": "tests-are-ours", "standing": "accepted" },
|
|
15
|
-
{ "name": "straight-through-tests", "title": "Straight-through tests", "principle": "tests-are-ours", "standing": "accepted" },
|
|
16
|
-
{ "name": "tested-where-its-owned", "title": "Tested where it's owned", "principle": "tests-are-ours", "standing": "accepted" },
|
|
17
|
-
{ "name": "doer-or-orchestrator", "title": "Doer or orchestrator", "principle": "one-place-decides", "standing": "accepted" },
|
|
18
|
-
{ "name": "handed-what-it-uses", "title": "Handed what it uses", "principle": "one-place-decides", "standing": "accepted" },
|
|
19
|
-
{ "name": "guard-first", "title": "Guard first", "principle": "one-place-decides", "standing": "accepted" },
|
|
20
|
-
{ "name": "one-reason-per-module", "title": "One reason per module", "principle": "one-place-decides", "standing": "accepted" },
|
|
21
|
-
{ "name": "outside-dependencies-stay-at-boundaries", "title": "Outside dependencies stay at boundaries", "principle": "external-behaviour-sits-at-a-boundary", "standing": "accepted" },
|
|
22
|
-
{ "name": "ports-declared-inside", "title": "Ports declared inside", "principle": "external-behaviour-sits-at-a-boundary", "standing": "accepted" },
|
|
23
|
-
{ "name": "failures-are-values", "title": "Failures are values", "principle": "the-type-checker-proves-it", "standing": "accepted" },
|
|
24
|
-
{ "name": "declared-not-asserted", "title": "Declared, not asserted", "principle": "the-type-checker-proves-it", "standing": "accepted" },
|
|
25
|
-
{ "name": "kinds-are-named", "title": "Kinds are named", "principle": "the-type-checker-proves-it", "standing": "accepted" },
|
|
26
|
-
{ "name": "one-word-everywhere", "title": "One word everywhere", "principle": "our-code-reads-in-the-common-language", "standing": "accepted" },
|
|
27
|
-
{ "name": "outside-dependencies-justified", "title": "Outside dependencies justified", "principle": "outside-risk-is-carried-on-purpose", "standing": "accepted" },
|
|
28
|
-
{ "name": "fixed-versions", "title": "Fixed versions", "principle": "outside-risk-is-carried-on-purpose", "standing": "accepted" },
|
|
29
|
-
{ "name": "tools-live-in-the-repo", "title": "Tools live in the repo", "principle": "outside-risk-is-carried-on-purpose", "standing": "accepted" },
|
|
30
|
-
{ "name": "upstream-stays-untouched", "title": "Upstream stays untouched", "principle": "outside-risk-is-carried-on-purpose", "standing": "accepted" },
|
|
31
|
-
{ "name": "shipped-risk-declared", "title": "Shipped risk declared", "principle": "outside-risk-is-carried-on-purpose", "standing": "proposed" }
|
|
32
|
-
],
|
|
33
|
-
"recipes": [
|
|
34
|
-
{ "name": "stub-with-vifn", "title": "Stub with vi.fn", "standing": "accepted" },
|
|
35
|
-
{ "name": "ports-in-the-argument", "title": "Ports in the argument", "standing": "accepted" },
|
|
36
|
-
{ "name": "iteach-over-typed-rows", "title": "it.each over typed rows", "standing": "accepted" },
|
|
37
|
-
{ "name": "assert-to-narrow", "title": "Assert to narrow", "standing": "accepted" },
|
|
38
|
-
{ "name": "whole-written-out-expectation", "title": "Whole written-out expectation", "standing": "accepted" },
|
|
39
|
-
{ "name": "failure-asserted-as-a-value", "title": "Failure asserted as a value", "standing": "accepted" },
|
|
40
|
-
{ "name": "companion-test-file", "title": "Companion test file", "standing": "accepted" },
|
|
41
|
-
{ "name": "integration-test-suffix", "title": "Integration test suffix", "standing": "accepted" },
|
|
42
|
-
{ "name": "integration-test-owns-its-scratch", "title": "Integration test owns its scratch", "standing": "accepted" },
|
|
43
|
-
{ "name": "composed-orchestrator", "title": "Composed orchestrator", "standing": "accepted" },
|
|
44
|
-
{ "name": "functional-iteration", "title": "Functional iteration", "standing": "accepted" },
|
|
45
|
-
{ "name": "one-argument-object", "title": "One argument object", "standing": "accepted" },
|
|
46
|
-
{ "name": "narrow-ports", "title": "Narrow ports", "standing": "accepted" },
|
|
47
|
-
{ "name": "entity-module", "title": "Entity module", "standing": "accepted" },
|
|
48
|
-
{ "name": "guard-clauses", "title": "Guard clauses", "standing": "accepted" },
|
|
49
|
-
{ "name": "screaming-folders", "title": "Screaming folders", "standing": "accepted" },
|
|
50
|
-
{ "name": "copy-never-write-in", "title": "Copy, never write in", "standing": "accepted" },
|
|
51
|
-
{ "name": "closure-factory", "title": "Closure factory", "standing": "accepted" },
|
|
52
|
-
{ "name": "adapter-per-outside-party", "title": "Adapter per outside party", "standing": "accepted" },
|
|
53
|
-
{ "name": "port-in-the-domain", "title": "Port in the domain", "standing": "accepted" },
|
|
54
|
-
{ "name": "world-values-through-a-port", "title": "World values through a port", "standing": "accepted" },
|
|
55
|
-
{ "name": "composition-root", "title": "Composition root", "standing": "accepted" },
|
|
56
|
-
{ "name": "zod-at-the-producers-adapter", "title": "Zod at the producer's adapter", "standing": "accepted" },
|
|
57
|
-
{ "name": "map-out-at-the-adapter", "title": "Map out at the adapter", "standing": "accepted" },
|
|
58
|
-
{ "name": "failure-mapping-at-the-adapter", "title": "Failure mapping at the adapter", "standing": "accepted" },
|
|
59
|
-
{ "name": "result-union", "title": "Result union", "standing": "accepted" },
|
|
60
|
-
{ "name": "named-exported-type", "title": "Named, exported type", "standing": "accepted" },
|
|
61
|
-
{ "name": "fix-the-declaration-not-the-value", "title": "Fix the declaration, not the value", "standing": "accepted" },
|
|
62
|
-
{ "name": "bounded-context-generic", "title": "Bounded context generic", "standing": "accepted" },
|
|
63
|
-
{ "name": "shared-strict-base-config", "title": "Shared strict base config", "standing": "accepted" },
|
|
64
|
-
{ "name": "tagged-union-and-exhaustive-switch", "title": "Tagged union and exhaustive switch", "standing": "accepted" },
|
|
65
|
-
{ "name": "domain-vocabulary-list", "title": "Domain vocabulary list", "standing": "accepted" },
|
|
66
|
-
{ "name": "whole-words", "title": "Whole words", "standing": "accepted" },
|
|
67
|
-
{ "name": "meaning-in-names-not-comments", "title": "Meaning in names, not comments", "standing": "accepted" },
|
|
68
|
-
{ "name": "dependency-record", "title": "Dependency record", "standing": "accepted" },
|
|
69
|
-
{ "name": "exact-pins-and-a-lock-file", "title": "Exact pins and a lock file", "standing": "accepted" },
|
|
70
|
-
{ "name": "repo-scripts-only", "title": "Repo scripts only", "standing": "accepted" },
|
|
71
|
-
{ "name": "extension-outside-the-vendored-code", "title": "Extension outside the vendored code", "standing": "accepted" },
|
|
72
|
-
{ "name": "declared-not-bundled", "title": "Declared, not bundled", "standing": "proposed" }
|
|
73
|
-
],
|
|
74
|
-
"recordKinds": [
|
|
75
|
-
{ "name": "authorised-location", "title": "Authorised location", "phrase": "an authorised location", "todaysFormat": "authorised-location" },
|
|
76
|
-
{ "name": "deviation", "title": "Deviation", "phrase": "a deviation", "todaysFormat": "none-yet" },
|
|
77
|
-
{ "name": "debt", "title": "Debt", "phrase": "debt", "todaysFormat": "file-carve-out" },
|
|
78
|
-
{ "name": "boundary-record", "title": "Boundary record", "phrase": "a boundary record", "todaysFormat": "authorised-location" },
|
|
79
|
-
{ "name": "dependency-record", "title": "Dependency record", "phrase": "a dependency record", "todaysFormat": "none-yet" }
|
|
80
|
-
],
|
|
81
|
-
"symptoms": [
|
|
82
|
-
{
|
|
83
|
-
"name": "date-used-directly",
|
|
84
|
-
"title": "Date used directly",
|
|
85
|
-
"seen": "Any use of `Date` (`Date.now()`, `new Date()`, `new Date(value)`, `Date.parse`) or `performance.now()` outside the places that handle dates.",
|
|
86
|
-
"mayIndicate": [
|
|
87
|
-
{ "case": "Needs the current time", "points": [{ "rule": "ports-declared-inside" }, { "rule": "written-out-answers" }] },
|
|
88
|
-
{ "case": "Does one job", "points": [{ "rule": "doer-or-orchestrator" }] }
|
|
89
|
-
],
|
|
90
|
-
"breachUsuallySits": "in the unit that should be passed the time, often a doer doing two jobs",
|
|
91
|
-
"recipes": ["world-values-through-a-port"],
|
|
92
|
-
"correctUses": [{ "situation": "correct use", "kind": "boundary-record", "at": "on the clock adapter" }]
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"name": "ambient-randomness",
|
|
96
|
-
"title": "Ambient randomness",
|
|
97
|
-
"seen": "`Math.random()`, `crypto.randomUUID()` or `crypto.getRandomValues()` outside their adapter.",
|
|
98
|
-
"mayIndicate": [
|
|
99
|
-
{ "case": "Needs a random value or a new id", "points": [{ "rule": "ports-declared-inside" }, { "rule": "written-out-answers" }] }
|
|
100
|
-
],
|
|
101
|
-
"breachUsuallySits": "in the unit that should be passed the value, often a doer doing two jobs",
|
|
102
|
-
"recipes": ["world-values-through-a-port"],
|
|
103
|
-
"correctUses": [{ "situation": "correct use", "kind": "boundary-record", "at": "on the adapter for random values or new ids" }]
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"name": "process-global-used-in-place",
|
|
107
|
-
"title": "Process global used in place",
|
|
108
|
-
"seen": "`process.env`, `process.argv`, `process.exit`, `process.on`, `console.*` or `globalThis` read outside an adapter.",
|
|
109
|
-
"mayIndicate": [
|
|
110
|
-
{ "case": "Reads data from outside", "points": [{ "principle": "no-leak-across-a-boundary" }] },
|
|
111
|
-
{ "case": "Causes an effect", "points": [{ "rule": "ports-declared-inside" }] },
|
|
112
|
-
{ "case": "Builds the real implementations", "points": [{ "rule": "ports-declared-inside" }] }
|
|
113
|
-
],
|
|
114
|
-
"breachUsuallySits": "at a missing port, or at an adapter not built at the entry point",
|
|
115
|
-
"recipes": ["world-values-through-a-port", "adapter-per-outside-party", "composition-root"],
|
|
116
|
-
"correctUses": [{ "situation": "correct use", "kind": "boundary-record", "at": "on the adapter that wraps the process" }]
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"name": "outside-import-past-a-boundary",
|
|
120
|
-
"title": "Outside import past a boundary",
|
|
121
|
-
"seen": "An import, `import()` or `require` of an outside dependency or runtime module (`node:*`) in a file with no boundary record.",
|
|
122
|
-
"mayIndicate": [
|
|
123
|
-
{ "case": "Uses a system or service outside the program", "points": [{ "rule": "outside-dependencies-stay-at-boundaries" }, { "rule": "ports-declared-inside" }] },
|
|
124
|
-
{ "case": "Takes an outside dependency", "points": [{ "rule": "outside-dependencies-stay-at-boundaries" }, { "rule": "ports-declared-inside" }] }
|
|
125
|
-
],
|
|
126
|
-
"breachUsuallySits": "at a missing adapter and port",
|
|
127
|
-
"recipes": ["adapter-per-outside-party", "port-in-the-domain"],
|
|
128
|
-
"correctUses": [{ "situation": "correct use", "kind": "boundary-record", "at": "on the adapter for that outside party" }]
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"name": "outside-type-in-a-signature",
|
|
132
|
-
"title": "Outside type in a signature",
|
|
133
|
-
"seen": "A type from an outside dependency or runtime library in a business-logic parameter, field or return, imported or inferred.",
|
|
134
|
-
"mayIndicate": [
|
|
135
|
-
{ "case": "Uses a system or service outside the program", "points": [{ "rule": "outside-dependencies-stay-at-boundaries" }, { "principle": "no-leak-across-a-boundary" }] }
|
|
136
|
-
],
|
|
137
|
-
"breachUsuallySits": "in the adapter that hands the outside type inward",
|
|
138
|
-
"recipes": ["adapter-per-outside-party"],
|
|
139
|
-
"correctUses": [{ "situation": "correct use", "kind": "boundary-record", "at": "on the adapter, or beyond it with a Conformist statement for an outside model adopted as ours" }]
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"name": "library-class-built-in-place",
|
|
143
|
-
"title": "Library class built in place",
|
|
144
|
-
"seen": "`new` on a class from an outside dependency, outside that dependency's adapter.",
|
|
145
|
-
"mayIndicate": [
|
|
146
|
-
{ "case": "Takes an outside dependency", "points": [{ "rule": "outside-dependencies-stay-at-boundaries" }] },
|
|
147
|
-
{ "case": "Keeps state or settings across calls", "points": [{ "principle": "no-hidden-effects" }] }
|
|
148
|
-
],
|
|
149
|
-
"breachUsuallySits": "at a missing adapter",
|
|
150
|
-
"recipes": ["adapter-per-outside-party", "closure-factory"],
|
|
151
|
-
"correctUses": [{ "situation": "correct use", "kind": "boundary-record", "at": "on that dependency's adapter" }]
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
"name": "text-past-its-reader",
|
|
155
|
-
"title": "Text past its reader",
|
|
156
|
-
"seen": "`JSON.parse`, `JSON.stringify` or a YAML parse or dump outside the adapter for whoever produced or receives the text, tests included.",
|
|
157
|
-
"mayIndicate": [
|
|
158
|
-
{ "case": "Reads data from outside", "points": [{ "principle": "no-leak-across-a-boundary" }] },
|
|
159
|
-
{ "case": "Sends data out", "points": [{ "principle": "no-leak-across-a-boundary" }] },
|
|
160
|
-
{ "case": "Uses a system or service outside the program", "points": [{ "principle": "external-behaviour-sits-at-a-boundary" }] },
|
|
161
|
-
{ "case": "States what the unit gives back", "points": [{ "rule": "straight-through-tests" }, { "rule": "written-out-answers" }] }
|
|
162
|
-
],
|
|
163
|
-
"breachUsuallySits": "in a port that takes or gives text where it should carry objects",
|
|
164
|
-
"recipes": ["adapter-per-outside-party", "map-out-at-the-adapter", "zod-at-the-producers-adapter", "whole-written-out-expectation"],
|
|
165
|
-
"correctUses": [
|
|
166
|
-
{ "situation": "correct use", "kind": "boundary-record", "at": "on the adapter for whoever produced or receives the text" },
|
|
167
|
-
{ "situation": "a use at one test site", "kind": "authorised-location", "at": "for this symptom alone" }
|
|
168
|
-
]
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"name": "schema-past-its-adapter",
|
|
172
|
-
"title": "Schema past its adapter",
|
|
173
|
-
"seen": "A schema, a `.parse` call or a `z.infer` type outside the producer's adapter, or the same value parsed twice.",
|
|
174
|
-
"mayIndicate": [
|
|
175
|
-
{ "case": "Reads data from outside", "points": [{ "principle": "no-leak-across-a-boundary" }] },
|
|
176
|
-
{ "case": "Gives a value its type", "points": [{ "rule": "declared-not-asserted" }] }
|
|
177
|
-
],
|
|
178
|
-
"breachUsuallySits": "in the adapter, which hands the wire type inward instead of mapping it",
|
|
179
|
-
"recipes": ["zod-at-the-producers-adapter"],
|
|
180
|
-
"correctUses": [{ "situation": "an outside model adopted as ours", "kind": "boundary-record", "at": "with a Conformist statement" }]
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"name": "claimed-type",
|
|
184
|
-
"title": "Claimed type",
|
|
185
|
-
"seen": "`as T` other than `as const`, `<T>x`, `x!` or `x!:`, including `as unknown` and any cast whose type holds `any`.",
|
|
186
|
-
"mayIndicate": [
|
|
187
|
-
{ "case": "Gives a value its type", "points": [{ "rule": "declared-not-asserted" }] },
|
|
188
|
-
{ "case": "Checks a value that may be one of several outcomes", "points": [{ "rule": "straight-through-tests" }] },
|
|
189
|
-
{ "case": "Builds an input for a test with a cast", "points": [{ "rule": "handed-what-it-uses" }] }
|
|
190
|
-
],
|
|
191
|
-
"breachUsuallySits": "in the declaration: an input too wide, a generic not bounded, a missing parse",
|
|
192
|
-
"recipes": ["fix-the-declaration-not-the-value", "assert-to-narrow", "one-argument-object"],
|
|
193
|
-
"correctUses": [{ "situation": "correct use", "kind": "authorised-location", "at": "in the adapter whose outside contract forces it" }]
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
"name": "untyped-value",
|
|
197
|
-
"title": "Untyped value",
|
|
198
|
-
"seen": "`any` in a type position, or a `let` with no type and no initial value.",
|
|
199
|
-
"mayIndicate": [
|
|
200
|
-
{ "case": "Gives a value its type", "points": [{ "rule": "declared-not-asserted" }] },
|
|
201
|
-
{ "case": "Reads data from outside", "points": [{ "principle": "no-leak-across-a-boundary" }] }
|
|
202
|
-
],
|
|
203
|
-
"breachUsuallySits": "at the boundary that let an unknown shape in",
|
|
204
|
-
"recipes": ["zod-at-the-producers-adapter", "fix-the-declaration-not-the-value"],
|
|
205
|
-
"correctUses": []
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"name": "own-type-guard",
|
|
209
|
-
"title": "Own type guard",
|
|
210
|
-
"seen": "A function of ours whose return type is `x is T` or `asserts x is T`.",
|
|
211
|
-
"mayIndicate": [
|
|
212
|
-
{ "case": "Gives a value its type", "points": [{ "rule": "declared-not-asserted" }] },
|
|
213
|
-
{ "case": "Reads data from outside", "points": [{ "principle": "no-leak-across-a-boundary" }] }
|
|
214
|
-
],
|
|
215
|
-
"breachUsuallySits": "at a missing schema parse in the adapter, or in a declaration too wide",
|
|
216
|
-
"recipes": ["zod-at-the-producers-adapter", "fix-the-declaration-not-the-value"],
|
|
217
|
-
"correctUses": []
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"name": "type-derived-from-code",
|
|
221
|
-
"title": "Type derived from code",
|
|
222
|
-
"seen": "`ReturnType<typeof x>`, `Parameters<typeof x>` or `typeof x` used as a type of our own.",
|
|
223
|
-
"mayIndicate": [
|
|
224
|
-
{ "case": "Gives a value its type", "points": [{ "rule": "declared-not-asserted" }] },
|
|
225
|
-
{ "case": "Names something", "points": [{ "rule": "one-word-everywhere" }] }
|
|
226
|
-
],
|
|
227
|
-
"breachUsuallySits": "in the producer, which has no named type",
|
|
228
|
-
"recipes": ["named-exported-type"],
|
|
229
|
-
"correctUses": [{ "situation": "correct use", "kind": "authorised-location", "at": "in the adapter for an outside dependency that gives no named type" }]
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
"name": "strictness-weakened",
|
|
233
|
-
"title": "Strictness weakened",
|
|
234
|
-
"seen": "A project whose resolved compiler options leave a strict flag off.",
|
|
235
|
-
"mayIndicate": [
|
|
236
|
-
{ "case": "Sets how strictly the checker works", "points": [{ "principle": "the-type-checker-proves-it" }] }
|
|
237
|
-
],
|
|
238
|
-
"breachUsuallySits": "in the base config or the project that overrides it",
|
|
239
|
-
"recipes": ["shared-strict-base-config"],
|
|
240
|
-
"correctUses": []
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
"name": "default-on-a-closed-union",
|
|
244
|
-
"title": "Default on a closed union",
|
|
245
|
-
"seen": "`default:` in a `switch` over a closed union.",
|
|
246
|
-
"mayIndicate": [
|
|
247
|
-
{ "case": "A value is one of several kinds", "points": [{ "rule": "kinds-are-named" }] }
|
|
248
|
-
],
|
|
249
|
-
"breachUsuallySits": "in the switch",
|
|
250
|
-
"recipes": ["tagged-union-and-exhaustive-switch"],
|
|
251
|
-
"correctUses": []
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
"name": "boolean-in-a-signature",
|
|
255
|
-
"title": "Boolean in a signature",
|
|
256
|
-
"seen": "A `boolean` parameter, field, or return that stands for a mode or state.",
|
|
257
|
-
"mayIndicate": [
|
|
258
|
-
{ "case": "A value is one of several kinds", "points": [{ "rule": "kinds-are-named" }] },
|
|
259
|
-
{ "case": "Does one job", "points": [{ "rule": "doer-or-orchestrator" }] }
|
|
260
|
-
],
|
|
261
|
-
"breachUsuallySits": "at a missing named kind, or in a unit with two modes",
|
|
262
|
-
"recipes": ["tagged-union-and-exhaustive-switch"],
|
|
263
|
-
"correctUses": []
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
"name": "absence-standing-for-a-state",
|
|
267
|
-
"title": "Absence standing for a state",
|
|
268
|
-
"seen": "A field typed `T | null` or `T | undefined`, or optional, whose absence means a state rather than \"not given\".",
|
|
269
|
-
"mayIndicate": [
|
|
270
|
-
{ "case": "A value is one of several kinds", "points": [{ "rule": "kinds-are-named" }] },
|
|
271
|
-
{ "case": "Keeps state across calls", "points": [{ "principle": "no-hidden-effects" }] }
|
|
272
|
-
],
|
|
273
|
-
"breachUsuallySits": "in the type, which needs named kinds",
|
|
274
|
-
"recipes": ["tagged-union-and-exhaustive-switch"],
|
|
275
|
-
"correctUses": []
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
"name": "default-for-a-required-value",
|
|
279
|
-
"title": "Default for a required value",
|
|
280
|
-
"seen": "`??`, `||` or a parameter default that supplies a required config, context or environment value.",
|
|
281
|
-
"mayIndicate": [
|
|
282
|
-
{ "case": "Reads data from outside", "points": [{ "principle": "no-leak-across-a-boundary" }] },
|
|
283
|
-
{ "case": "An operation can fail", "points": [{ "rule": "failures-are-values" }] },
|
|
284
|
-
{ "case": "Gives a value its type", "points": [{ "rule": "declared-not-asserted" }] }
|
|
285
|
-
],
|
|
286
|
-
"breachUsuallySits": "in the declaration or the adapter: a missing value is a failure",
|
|
287
|
-
"recipes": ["zod-at-the-producers-adapter", "bounded-context-generic"],
|
|
288
|
-
"correctUses": []
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
"name": "throw-between-our-units",
|
|
292
|
-
"title": "Throw between our units",
|
|
293
|
-
"seen": "`throw` outside an adapter whose caller's contract is exceptions.",
|
|
294
|
-
"mayIndicate": [
|
|
295
|
-
{ "case": "An operation can fail", "points": [{ "rule": "failures-are-values" }] },
|
|
296
|
-
{ "case": "Sends data out", "points": [{ "principle": "no-leak-across-a-boundary" }] }
|
|
297
|
-
],
|
|
298
|
-
"breachUsuallySits": "in the unit, or at a missing mapping in the adapter",
|
|
299
|
-
"recipes": ["result-union", "failure-mapping-at-the-adapter"],
|
|
300
|
-
"correctUses": [{ "situation": "correct use", "kind": "authorised-location", "at": "at an adapter whose caller's contract is exceptions" }]
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
"name": "thrown-non-error",
|
|
304
|
-
"title": "Thrown non-error",
|
|
305
|
-
"seen": "`throw` of a literal, an object or a template.",
|
|
306
|
-
"mayIndicate": [
|
|
307
|
-
{ "case": "Sends data out", "points": [{ "principle": "no-leak-across-a-boundary" }] }
|
|
308
|
-
],
|
|
309
|
-
"breachUsuallySits": "at the throw site",
|
|
310
|
-
"recipes": ["failure-mapping-at-the-adapter"],
|
|
311
|
-
"correctUses": []
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
"name": "failure-shaped-as-success",
|
|
315
|
-
"title": "Failure shaped as success",
|
|
316
|
-
"seen": "A failed path that returns `null`, `false`, `[]`, `undefined` or a default, or a `catch` that returns one.",
|
|
317
|
-
"mayIndicate": [
|
|
318
|
-
{ "case": "An operation can fail", "points": [{ "rule": "failures-are-values" }] }
|
|
319
|
-
],
|
|
320
|
-
"breachUsuallySits": "in the unit's return type",
|
|
321
|
-
"recipes": ["result-union"],
|
|
322
|
-
"correctUses": []
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
"name": "catch-all-failure-kind",
|
|
326
|
-
"title": "Catch-all failure kind",
|
|
327
|
-
"seen": "A failure variant such as `unknown`, `other` or a bare message string, carrying no named cause.",
|
|
328
|
-
"mayIndicate": [
|
|
329
|
-
{ "case": "An operation can fail", "points": [{ "rule": "failures-are-values" }] },
|
|
330
|
-
{ "case": "A value is one of several kinds", "points": [{ "rule": "kinds-are-named" }] }
|
|
331
|
-
],
|
|
332
|
-
"breachUsuallySits": "in the adapter, which did not name the outside failure",
|
|
333
|
-
"recipes": ["result-union", "failure-mapping-at-the-adapter"],
|
|
334
|
-
"correctUses": []
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
"name": "loop-keyword",
|
|
338
|
-
"title": "Loop keyword",
|
|
339
|
-
"seen": "`for`, `for…of`, `for…in`, `for await`, `while` or `do`.",
|
|
340
|
-
"mayIndicate": [
|
|
341
|
-
{ "case": "Makes a new value", "points": [{ "principle": "no-hidden-effects" }] },
|
|
342
|
-
{ "case": "Causes an effect", "points": [{ "rule": "ports-declared-inside" }] },
|
|
343
|
-
{ "case": "Coordinates other units", "points": [{ "rule": "doer-or-orchestrator" }] }
|
|
344
|
-
],
|
|
345
|
-
"breachUsuallySits": "in the unit",
|
|
346
|
-
"recipes": ["functional-iteration"],
|
|
347
|
-
"correctUses": [{ "situation": "draining a stream", "kind": "authorised-location", "at": "in its source's adapter" }]
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
"name": "write-into-a-parameter",
|
|
351
|
-
"title": "Write into a parameter",
|
|
352
|
-
"seen": "Assigning to or deleting a parameter's field, or calling an in-place method (`push`, `sort`, `splice`) on a parameter.",
|
|
353
|
-
"mayIndicate": [
|
|
354
|
-
{ "case": "Makes a new value", "points": [{ "principle": "no-hidden-effects" }] }
|
|
355
|
-
],
|
|
356
|
-
"breachUsuallySits": "in the unit",
|
|
357
|
-
"recipes": ["copy-never-write-in"],
|
|
358
|
-
"correctUses": []
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
"name": "rebinding",
|
|
362
|
-
"title": "Rebinding",
|
|
363
|
-
"seen": "A `let` assigned again, or a parameter reassigned, incremented or destructured into.",
|
|
364
|
-
"mayIndicate": [
|
|
365
|
-
{ "case": "Makes a new value", "points": [{ "principle": "no-hidden-effects" }] },
|
|
366
|
-
{ "case": "Does one job", "points": [{ "rule": "doer-or-orchestrator" }] }
|
|
367
|
-
],
|
|
368
|
-
"breachUsuallySits": "in the unit: no caller sees it, so on its own it shows no hidden effect, but it is suspect for work done inline in steps",
|
|
369
|
-
"recipes": ["copy-never-write-in", "functional-iteration"],
|
|
370
|
-
"correctUses": []
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
"name": "authored-class-or-this",
|
|
374
|
-
"title": "Authored class or this",
|
|
375
|
-
"seen": "The `class` keyword in our code, `static`-only classes included, or `this` read outside a class.",
|
|
376
|
-
"mayIndicate": [
|
|
377
|
-
{ "case": "Keeps state or settings across calls", "points": [{ "principle": "no-hidden-effects" }] },
|
|
378
|
-
{ "case": "Reuses behaviour", "points": [{ "rule": "one-reason-per-module" }] },
|
|
379
|
-
{ "case": "Gives a value its type", "points": [{ "rule": "declared-not-asserted" }] }
|
|
380
|
-
],
|
|
381
|
-
"breachUsuallySits": "in the unit",
|
|
382
|
-
"recipes": ["closure-factory"],
|
|
383
|
-
"correctUses": []
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
"name": "module-level-state",
|
|
387
|
-
"title": "Module-level state",
|
|
388
|
-
"seen": "A module-scope `let`, or a module-scope collection that functions change.",
|
|
389
|
-
"mayIndicate": [
|
|
390
|
-
{ "case": "Keeps state across calls", "points": [{ "principle": "no-hidden-effects" }, { "principle": "external-behaviour-sits-at-a-boundary" }] }
|
|
391
|
-
],
|
|
392
|
-
"breachUsuallySits": "at a missing adapter for the state",
|
|
393
|
-
"recipes": ["closure-factory"],
|
|
394
|
-
"correctUses": []
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
"name": "long-function",
|
|
398
|
-
"title": "Long function",
|
|
399
|
-
"seen": "A function body over the line limit.",
|
|
400
|
-
"mayIndicate": [
|
|
401
|
-
{ "case": "Coordinates other units", "points": [{ "rule": "doer-or-orchestrator" }] },
|
|
402
|
-
{ "case": "Does one job", "points": [{ "rule": "doer-or-orchestrator" }] },
|
|
403
|
-
{ "case": "Gives a value its type", "points": [{ "rule": "handed-what-it-uses" }] },
|
|
404
|
-
{ "case": "Checks conditions", "points": [{ "rule": "guard-first" }] },
|
|
405
|
-
{ "case": "Puts code in a file", "points": [{ "rule": "one-reason-per-module" }, { "rule": "one-word-everywhere" }] },
|
|
406
|
-
{ "case": "Names something", "points": [{ "rule": "one-reason-per-module" }, { "rule": "one-word-everywhere" }] }
|
|
407
|
-
],
|
|
408
|
-
"breachUsuallySits": "in the unit: several jobs, an input wider than its use, nested questions, or a responsibility not isolated and named",
|
|
409
|
-
"recipes": ["composed-orchestrator", "guard-clauses", "one-argument-object"],
|
|
410
|
-
"correctUses": []
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
"name": "tangled-function",
|
|
414
|
-
"title": "Tangled function",
|
|
415
|
-
"seen": "A function over the cognitive-complexity limit.",
|
|
416
|
-
"mayIndicate": [
|
|
417
|
-
{ "case": "Coordinates other units", "points": [{ "rule": "doer-or-orchestrator" }] },
|
|
418
|
-
{ "case": "Does one job", "points": [{ "rule": "doer-or-orchestrator" }] },
|
|
419
|
-
{ "case": "Gives a value its type", "points": [{ "rule": "handed-what-it-uses" }] },
|
|
420
|
-
{ "case": "Checks conditions", "points": [{ "rule": "guard-first" }] },
|
|
421
|
-
{ "case": "Puts code in a file", "points": [{ "rule": "one-reason-per-module" }, { "rule": "one-word-everywhere" }] },
|
|
422
|
-
{ "case": "Names something", "points": [{ "rule": "one-reason-per-module" }, { "rule": "one-word-everywhere" }] }
|
|
423
|
-
],
|
|
424
|
-
"breachUsuallySits": "in the unit: several jobs, an input wider than its use, nested questions, or a responsibility not isolated and named",
|
|
425
|
-
"recipes": ["composed-orchestrator", "guard-clauses", "one-argument-object"],
|
|
426
|
-
"correctUses": []
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
"name": "work-inside-a-condition",
|
|
430
|
-
"title": "Work inside a condition",
|
|
431
|
-
"seen": "An `if` inside another `if`, or an `else` after a branch that always exits.",
|
|
432
|
-
"mayIndicate": [
|
|
433
|
-
{ "case": "Checks conditions", "points": [{ "rule": "guard-first" }] },
|
|
434
|
-
{ "case": "Does one job", "points": [{ "rule": "doer-or-orchestrator" }] }
|
|
435
|
-
],
|
|
436
|
-
"breachUsuallySits": "in the unit's questions",
|
|
437
|
-
"recipes": ["guard-clauses"],
|
|
438
|
-
"correctUses": []
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
"name": "orchestrator-that-computes",
|
|
442
|
-
"title": "Orchestrator that computes",
|
|
443
|
-
"seen": "A function that calls two or more units of ours and also branches, computes or reshapes between the calls.",
|
|
444
|
-
"mayIndicate": [
|
|
445
|
-
{ "case": "Coordinates other units", "points": [{ "rule": "doer-or-orchestrator" }] }
|
|
446
|
-
],
|
|
447
|
-
"breachUsuallySits": "in the orchestrator",
|
|
448
|
-
"recipes": ["composed-orchestrator"],
|
|
449
|
-
"correctUses": []
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
"name": "doer-calling-our-own-unit",
|
|
453
|
-
"title": "Doer calling our own unit",
|
|
454
|
-
"seen": "A function with logic that imports and calls a business-logic unit of ours that is not a port.",
|
|
455
|
-
"mayIndicate": [
|
|
456
|
-
{ "case": "Does one job", "points": [{ "rule": "doer-or-orchestrator" }] },
|
|
457
|
-
{ "case": "Uses what a collaborator gives back", "points": [{ "rule": "written-out-answers" }] }
|
|
458
|
-
],
|
|
459
|
-
"breachUsuallySits": "in the unit, which mixes two roles",
|
|
460
|
-
"recipes": ["composed-orchestrator", "ports-in-the-argument"],
|
|
461
|
-
"correctUses": []
|
|
462
|
-
},
|
|
463
|
-
{
|
|
464
|
-
"name": "positional-parameters",
|
|
465
|
-
"title": "Positional parameters",
|
|
466
|
-
"seen": "A function of ours, whose shape no outside API fixes, that has two or more parameters.",
|
|
467
|
-
"mayIndicate": [
|
|
468
|
-
{ "case": "Names something", "points": [{ "rule": "one-word-everywhere" }] },
|
|
469
|
-
{ "case": "Does one job", "points": [{ "rule": "handed-what-it-uses" }] }
|
|
470
|
-
],
|
|
471
|
-
"breachUsuallySits": "in the signature",
|
|
472
|
-
"recipes": ["one-argument-object"],
|
|
473
|
-
"correctUses": []
|
|
474
|
-
},
|
|
475
|
-
{
|
|
476
|
-
"name": "tuple-as-data",
|
|
477
|
-
"title": "Tuple as data",
|
|
478
|
-
"seen": "An array literal or type of fixed mixed positions used as a value, such as `[key, value]` pairs or `pair[1]`.",
|
|
479
|
-
"mayIndicate": [
|
|
480
|
-
{ "case": "Names something", "points": [{ "rule": "one-word-everywhere" }] }
|
|
481
|
-
],
|
|
482
|
-
"breachUsuallySits": "in the data's type",
|
|
483
|
-
"recipes": ["one-argument-object"],
|
|
484
|
-
"correctUses": []
|
|
485
|
-
},
|
|
486
|
-
{
|
|
487
|
-
"name": "wide-input",
|
|
488
|
-
"title": "Wide input",
|
|
489
|
-
"seen": "A parameter type holding fields the unit never reads.",
|
|
490
|
-
"mayIndicate": [
|
|
491
|
-
{ "case": "Does one job", "points": [{ "rule": "handed-what-it-uses" }] },
|
|
492
|
-
{ "case": "Gives a value its type", "points": [{ "rule": "handed-what-it-uses" }] }
|
|
493
|
-
],
|
|
494
|
-
"breachUsuallySits": "in the unit's declared input",
|
|
495
|
-
"recipes": ["one-argument-object", "entity-module"],
|
|
496
|
-
"correctUses": []
|
|
497
|
-
},
|
|
498
|
-
{
|
|
499
|
-
"name": "wide-port",
|
|
500
|
-
"title": "Wide port",
|
|
501
|
-
"seen": "A port with methods its consumer never calls.",
|
|
502
|
-
"mayIndicate": [
|
|
503
|
-
{ "case": "Uses a system or service outside the program", "points": [{ "rule": "handed-what-it-uses" }, { "rule": "ports-declared-inside" }] }
|
|
504
|
-
],
|
|
505
|
-
"breachUsuallySits": "in the port",
|
|
506
|
-
"recipes": ["narrow-ports"],
|
|
507
|
-
"correctUses": []
|
|
508
|
-
},
|
|
509
|
-
{
|
|
510
|
-
"name": "inner-layer-imports-outer",
|
|
511
|
-
"title": "Inner layer imports outer",
|
|
512
|
-
"seen": "A domain or business-logic file that imports an adapter or infrastructure file.",
|
|
513
|
-
"mayIndicate": [
|
|
514
|
-
{ "case": "Uses a system or service outside the program", "points": [{ "rule": "ports-declared-inside" }, { "rule": "outside-dependencies-stay-at-boundaries" }, { "principle": "external-behaviour-sits-at-a-boundary" }] }
|
|
515
|
-
],
|
|
516
|
-
"breachUsuallySits": "in the import, or in a port declared on the wrong side",
|
|
517
|
-
"recipes": ["port-in-the-domain"],
|
|
518
|
-
"correctUses": []
|
|
519
|
-
},
|
|
520
|
-
{
|
|
521
|
-
"name": "port-outside-the-domain",
|
|
522
|
-
"title": "Port outside the domain",
|
|
523
|
-
"seen": "A port interface declared in an adapter's module, or beside its default adapter.",
|
|
524
|
-
"mayIndicate": [
|
|
525
|
-
{ "case": "Uses a system or service outside the program", "points": [{ "rule": "ports-declared-inside" }] }
|
|
526
|
-
],
|
|
527
|
-
"breachUsuallySits": "in the port's file",
|
|
528
|
-
"recipes": ["port-in-the-domain"],
|
|
529
|
-
"correctUses": []
|
|
530
|
-
},
|
|
531
|
-
{
|
|
532
|
-
"name": "adapter-built-outside-the-root",
|
|
533
|
-
"title": "Adapter built outside the root",
|
|
534
|
-
"seen": "A call to an adapter's factory anywhere but the entry point.",
|
|
535
|
-
"mayIndicate": [
|
|
536
|
-
{ "case": "Builds the real implementations", "points": [{ "rule": "ports-declared-inside" }, { "rule": "doer-or-orchestrator" }] }
|
|
537
|
-
],
|
|
538
|
-
"breachUsuallySits": "in the calling unit, which builds what it should be passed",
|
|
539
|
-
"recipes": ["composition-root"],
|
|
540
|
-
"correctUses": []
|
|
541
|
-
},
|
|
542
|
-
{
|
|
543
|
-
"name": "port-named-for-a-mechanism",
|
|
544
|
-
"title": "Port named for a mechanism",
|
|
545
|
-
"seen": "A port named for a technology (`HttpClient`, `Fs`, `Sqlite`) rather than a capability.",
|
|
546
|
-
"mayIndicate": [
|
|
547
|
-
{ "case": "Uses a system or service outside the program", "points": [{ "rule": "ports-declared-inside" }] },
|
|
548
|
-
{ "case": "Names something", "points": [{ "rule": "one-word-everywhere" }] }
|
|
549
|
-
],
|
|
550
|
-
"breachUsuallySits": "in the port",
|
|
551
|
-
"recipes": ["port-in-the-domain"],
|
|
552
|
-
"correctUses": []
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
"name": "double-with-a-body",
|
|
556
|
-
"title": "Double with a body",
|
|
557
|
-
"seen": "A double that has a function body at all: `vi.fn(impl)`, `mockImplementation`, or a hand-written function or object double. A body that only returns a value is included.",
|
|
558
|
-
"mayIndicate": [
|
|
559
|
-
{ "case": "Uses what a collaborator gives back", "points": [{ "rule": "written-out-answers" }, { "rule": "handed-what-it-uses" }, { "rule": "doer-or-orchestrator" }] }
|
|
560
|
-
],
|
|
561
|
-
"breachUsuallySits": "in a port too wide, or in a collaborator holding two decisions",
|
|
562
|
-
"recipes": ["stub-with-vifn"],
|
|
563
|
-
"correctUses": [{ "situation": "a fake, where a stub cannot do the test", "kind": "deviation", "at": "from Stub with vi.fn" }]
|
|
564
|
-
},
|
|
565
|
-
{
|
|
566
|
-
"name": "module-or-global-patched",
|
|
567
|
-
"title": "Module or global patched",
|
|
568
|
-
"seen": "`vi.mock`, `vi.stubGlobal`, a spy on a global, or `process.env` set in a test.",
|
|
569
|
-
"mayIndicate": [
|
|
570
|
-
{ "case": "Uses what a collaborator gives back", "points": [{ "rule": "written-out-answers" }, { "rule": "ports-declared-inside" }] }
|
|
571
|
-
],
|
|
572
|
-
"breachUsuallySits": "in the unit, which imports what it should be passed",
|
|
573
|
-
"recipes": ["ports-in-the-argument"],
|
|
574
|
-
"correctUses": []
|
|
575
|
-
},
|
|
576
|
-
{
|
|
577
|
-
"name": "branch-in-a-test",
|
|
578
|
-
"title": "Branch in a test",
|
|
579
|
-
"seen": "`if`, a ternary, `&&`, `||`, `??`, `?.` or `switch` in a test file.",
|
|
580
|
-
"mayIndicate": [
|
|
581
|
-
{ "case": "Checks a value that may be one of several outcomes", "points": [{ "rule": "straight-through-tests" }, { "rule": "kinds-are-named" }, { "rule": "failures-are-values" }] }
|
|
582
|
-
],
|
|
583
|
-
"breachUsuallySits": "in the unit's output type, where optional or loose shapes force the test to branch",
|
|
584
|
-
"recipes": ["assert-to-narrow", "iteach-over-typed-rows"],
|
|
585
|
-
"correctUses": []
|
|
586
|
-
},
|
|
587
|
-
{
|
|
588
|
-
"name": "computed-value-in-a-test",
|
|
589
|
-
"title": "Computed value in a test",
|
|
590
|
-
"seen": "A test that builds or picks a value: array methods, `find`, `Math.*`, `Object.assign`, `Object.fromEntries`, `Array.from` or a spread over a list. Calls on the unit's own API are not included.",
|
|
591
|
-
"mayIndicate": [
|
|
592
|
-
{ "case": "States what the unit gives back", "points": [{ "rule": "straight-through-tests" }, { "rule": "written-out-answers" }] }
|
|
593
|
-
],
|
|
594
|
-
"breachUsuallySits": "in the test, or in logic no unit owns",
|
|
595
|
-
"recipes": ["whole-written-out-expectation", "iteach-over-typed-rows"],
|
|
596
|
-
"correctUses": []
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
"name": "throw-or-catch-in-a-test",
|
|
600
|
-
"title": "Throw or catch in a test",
|
|
601
|
-
"seen": "`throw`, `try` or `catch` in a test file.",
|
|
602
|
-
"mayIndicate": [
|
|
603
|
-
{ "case": "States what the unit gives back", "points": [{ "rule": "straight-through-tests" }] },
|
|
604
|
-
{ "case": "An operation can fail", "points": [{ "rule": "failures-are-values" }] }
|
|
605
|
-
],
|
|
606
|
-
"breachUsuallySits": "in the unit, which throws",
|
|
607
|
-
"recipes": ["failure-asserted-as-a-value"],
|
|
608
|
-
"correctUses": []
|
|
609
|
-
},
|
|
610
|
-
{
|
|
611
|
-
"name": "unasserted-call",
|
|
612
|
-
"title": "Unasserted call",
|
|
613
|
-
"seen": "A stub or spy passed to the unit whose calls the test never asserts.",
|
|
614
|
-
"mayIndicate": [
|
|
615
|
-
{ "case": "Uses what a collaborator gives back", "points": [{ "rule": "written-out-answers" }] }
|
|
616
|
-
],
|
|
617
|
-
"breachUsuallySits": "in the test",
|
|
618
|
-
"recipes": ["stub-with-vifn"],
|
|
619
|
-
"correctUses": []
|
|
620
|
-
},
|
|
621
|
-
{
|
|
622
|
-
"name": "answer-set-in-a-hook",
|
|
623
|
-
"title": "Answer set in a hook",
|
|
624
|
-
"seen": "A test hook that gives a stub its answer (`mockReturnValue`, `mockResolvedValue`, `mockImplementation`) or reassigns a value the tests read. A plain reset in `afterEach` is not this symptom.",
|
|
625
|
-
"mayIndicate": [
|
|
626
|
-
{ "case": "States what the unit gives back", "points": [{ "rule": "straight-through-tests" }] },
|
|
627
|
-
{ "case": "Uses what a collaborator gives back", "points": [{ "rule": "written-out-answers" }] },
|
|
628
|
-
{ "case": "Keeps state across calls", "points": [{ "principle": "no-hidden-effects" }] }
|
|
629
|
-
],
|
|
630
|
-
"breachUsuallySits": "in a double or a value shared across tests at file or suite scope, or in state held in the unit's module",
|
|
631
|
-
"recipes": ["stub-with-vifn"],
|
|
632
|
-
"correctUses": []
|
|
633
|
-
},
|
|
634
|
-
{
|
|
635
|
-
"name": "test-switched-off",
|
|
636
|
-
"title": "Test switched off",
|
|
637
|
-
"seen": "`.only`, `.skip`, `fit` or `xit`.",
|
|
638
|
-
"mayIndicate": [
|
|
639
|
-
{ "case": "Gives each unit its test", "points": [{ "rule": "tested-where-its-owned" }] }
|
|
640
|
-
],
|
|
641
|
-
"breachUsuallySits": "in the test file",
|
|
642
|
-
"recipes": [],
|
|
643
|
-
"correctUses": []
|
|
644
|
-
},
|
|
645
|
-
{
|
|
646
|
-
"name": "unit-without-a-running-test",
|
|
647
|
-
"title": "Unit without a running test",
|
|
648
|
-
"seen": "A file with a runtime export and no `name.test.ts` beside it that imports and runs it.",
|
|
649
|
-
"mayIndicate": [
|
|
650
|
-
{ "case": "Gives each unit its test", "points": [{ "rule": "tested-where-its-owned" }] }
|
|
651
|
-
],
|
|
652
|
-
"breachUsuallySits": "in the missing test",
|
|
653
|
-
"recipes": ["companion-test-file"],
|
|
654
|
-
"correctUses": []
|
|
655
|
-
},
|
|
656
|
-
{
|
|
657
|
-
"name": "machine-touched-in-a-unit-test",
|
|
658
|
-
"title": "Machine touched in a unit test",
|
|
659
|
-
"seen": "A unit test that reads or writes files, spawns a process, opens a socket or makes a temp directory.",
|
|
660
|
-
"mayIndicate": [
|
|
661
|
-
{ "case": "Tests across units or against a real system", "points": [{ "rule": "tested-where-its-owned" }] },
|
|
662
|
-
{ "case": "Uses what a collaborator gives back", "points": [{ "rule": "written-out-answers" }] }
|
|
663
|
-
],
|
|
664
|
-
"breachUsuallySits": "in the unit, which has no port, or in a test that is an integration test misnamed",
|
|
665
|
-
"recipes": ["integration-test-owns-its-scratch", "integration-test-suffix", "ports-in-the-argument"],
|
|
666
|
-
"correctUses": []
|
|
667
|
-
},
|
|
668
|
-
{
|
|
669
|
-
"name": "inherited-environment-in-a-subprocess",
|
|
670
|
-
"title": "Inherited environment in a subprocess",
|
|
671
|
-
"seen": "A process spawned in a test with no explicit environment, or one built from `process.env`.",
|
|
672
|
-
"mayIndicate": [
|
|
673
|
-
{ "case": "Tests across units or against a real system", "points": [{ "rule": "tested-where-its-owned" }] }
|
|
674
|
-
],
|
|
675
|
-
"breachUsuallySits": "at the spawn site",
|
|
676
|
-
"recipes": ["integration-test-owns-its-scratch"],
|
|
677
|
-
"correctUses": []
|
|
678
|
-
},
|
|
679
|
-
{
|
|
680
|
-
"name": "behaviour-tested-away-from-its-owner",
|
|
681
|
-
"title": "Behaviour tested away from its owner",
|
|
682
|
-
"seen": "A unit test that asserts what a collaborator does, or an integration test that pins a rule a unit owns.",
|
|
683
|
-
"mayIndicate": [
|
|
684
|
-
{ "case": "Tests across units", "points": [{ "rule": "tested-where-its-owned" }, { "rule": "written-out-answers" }] },
|
|
685
|
-
{ "case": "Gives each unit its test", "points": [{ "rule": "tested-where-its-owned" }, { "rule": "written-out-answers" }] }
|
|
686
|
-
],
|
|
687
|
-
"breachUsuallySits": "in the level the test is written at",
|
|
688
|
-
"recipes": ["companion-test-file", "integration-test-suffix"],
|
|
689
|
-
"correctUses": []
|
|
690
|
-
},
|
|
691
|
-
{
|
|
692
|
-
"name": "integration-heavy-suite",
|
|
693
|
-
"title": "Integration-heavy suite",
|
|
694
|
-
"seen": "More integration tests, or more integration test cases, than the bindings to the outside they cover.",
|
|
695
|
-
"mayIndicate": [
|
|
696
|
-
{ "case": "Tests across units", "points": [{ "rule": "tested-where-its-owned" }] }
|
|
697
|
-
],
|
|
698
|
-
"breachUsuallySits": "in missing unit tests and ports",
|
|
699
|
-
"recipes": ["integration-test-suffix", "companion-test-file"],
|
|
700
|
-
"correctUses": []
|
|
701
|
-
},
|
|
702
|
-
{
|
|
703
|
-
"name": "coverage-gate",
|
|
704
|
-
"title": "Coverage gate",
|
|
705
|
-
"seen": "A coverage percentage threshold in test config.",
|
|
706
|
-
"mayIndicate": [
|
|
707
|
-
{ "case": "Gives each unit its test", "points": [{ "rule": "tested-where-its-owned" }] }
|
|
708
|
-
],
|
|
709
|
-
"breachUsuallySits": "in the config",
|
|
710
|
-
"recipes": ["companion-test-file"],
|
|
711
|
-
"correctUses": []
|
|
712
|
-
},
|
|
713
|
-
{
|
|
714
|
-
"name": "large-input-for-a-few-fields",
|
|
715
|
-
"title": "Large input for a few fields",
|
|
716
|
-
"seen": "A test that writes a large object, or casts, to give the unit the few fields it reads.",
|
|
717
|
-
"mayIndicate": [
|
|
718
|
-
{ "case": "Gives a value its type", "points": [{ "rule": "handed-what-it-uses" }] },
|
|
719
|
-
{ "case": "Does one job", "points": [{ "rule": "handed-what-it-uses" }] }
|
|
720
|
-
],
|
|
721
|
-
"breachUsuallySits": "in the unit's declared input",
|
|
722
|
-
"recipes": ["one-argument-object"],
|
|
723
|
-
"correctUses": []
|
|
724
|
-
},
|
|
725
|
-
{
|
|
726
|
-
"name": "test-of-the-type-checker",
|
|
727
|
-
"title": "Test of the type checker",
|
|
728
|
-
"seen": "A test that asserts only what the types already prove, such as exhaustiveness.",
|
|
729
|
-
"mayIndicate": [
|
|
730
|
-
{ "case": "Gives each unit its test", "points": [{ "rule": "tested-where-its-owned" }, { "principle": "the-type-checker-proves-it" }] }
|
|
731
|
-
],
|
|
732
|
-
"breachUsuallySits": "in the test",
|
|
733
|
-
"recipes": [],
|
|
734
|
-
"correctUses": []
|
|
735
|
-
},
|
|
736
|
-
{
|
|
737
|
-
"name": "shorthand-name",
|
|
738
|
-
"title": "Shorthand name",
|
|
739
|
-
"seen": "A name of single letters, an abbreviation or a filler word (`data`, `result`, `options`, `tx`), at any scope.",
|
|
740
|
-
"mayIndicate": [
|
|
741
|
-
{ "case": "Names something", "points": [{ "rule": "one-word-everywhere" }] }
|
|
742
|
-
],
|
|
743
|
-
"breachUsuallySits": "in the name",
|
|
744
|
-
"recipes": ["whole-words"],
|
|
745
|
-
"correctUses": [{ "situation": "a name an outside contract fixes", "kind": "authorised-location" }]
|
|
746
|
-
},
|
|
747
|
-
{
|
|
748
|
-
"name": "name-off-its-casing",
|
|
749
|
-
"title": "Name off its casing",
|
|
750
|
-
"seen": "An identifier or file name outside the adopter's casing convention.",
|
|
751
|
-
"mayIndicate": [
|
|
752
|
-
{ "case": "Names something", "points": [{ "rule": "one-word-everywhere" }] }
|
|
753
|
-
],
|
|
754
|
-
"breachUsuallySits": "in the name",
|
|
755
|
-
"recipes": [],
|
|
756
|
-
"correctUses": [{ "situation": "an outside contract's names, such as `PATH` or ESLint listener keys", "kind": "authorised-location" }]
|
|
757
|
-
},
|
|
758
|
-
{
|
|
759
|
-
"name": "drawer-path",
|
|
760
|
-
"title": "Drawer path",
|
|
761
|
-
"seen": "A file or folder named utils, helpers, types, common, shared or the like.",
|
|
762
|
-
"mayIndicate": [
|
|
763
|
-
{ "case": "Puts code in a file or folder", "points": [{ "rule": "one-reason-per-module" }] }
|
|
764
|
-
],
|
|
765
|
-
"breachUsuallySits": "in the module's contents",
|
|
766
|
-
"recipes": ["screaming-folders"],
|
|
767
|
-
"correctUses": []
|
|
768
|
-
},
|
|
769
|
-
{
|
|
770
|
-
"name": "types-only-file",
|
|
771
|
-
"title": "Types-only file",
|
|
772
|
-
"seen": "A file that declares only types and is not a port declaration.",
|
|
773
|
-
"mayIndicate": [
|
|
774
|
-
{ "case": "Puts code in a file", "points": [{ "rule": "one-reason-per-module" }] },
|
|
775
|
-
{ "case": "Reuses behaviour", "points": [{ "rule": "one-reason-per-module" }] }
|
|
776
|
-
],
|
|
777
|
-
"breachUsuallySits": "in the entity's module",
|
|
778
|
-
"recipes": ["entity-module"],
|
|
779
|
-
"correctUses": []
|
|
780
|
-
},
|
|
781
|
-
{
|
|
782
|
-
"name": "prose-in-code",
|
|
783
|
-
"title": "Prose in code",
|
|
784
|
-
"seen": "Any comment or JSDoc other than a tracked pointer or a covered tool directive.",
|
|
785
|
-
"mayIndicate": [
|
|
786
|
-
{ "case": "Explains something in prose", "points": [{ "rule": "one-word-everywhere" }] }
|
|
787
|
-
],
|
|
788
|
-
"breachUsuallySits": "in a name or type that does not carry the meaning",
|
|
789
|
-
"recipes": ["meaning-in-names-not-comments"],
|
|
790
|
-
"correctUses": []
|
|
791
|
-
},
|
|
792
|
-
{
|
|
793
|
-
"name": "untracked-escape",
|
|
794
|
-
"title": "Untracked escape",
|
|
795
|
-
"seen": "A TODO, linter directive or `@ts-*` directive with no tracked reference and no record.",
|
|
796
|
-
"mayIndicate": [
|
|
797
|
-
{ "case": "Explains something in prose", "points": [{ "rule": "one-word-everywhere" }] }
|
|
798
|
-
],
|
|
799
|
-
"breachUsuallySits": "in the record that is missing, and in whatever rule the directive switches off",
|
|
800
|
-
"recipes": ["meaning-in-names-not-comments"],
|
|
801
|
-
"correctUses": []
|
|
802
|
-
},
|
|
803
|
-
{
|
|
804
|
-
"name": "many-spellings-of-one-concept",
|
|
805
|
-
"title": "Many spellings of one concept",
|
|
806
|
-
"seen": "One domain concept named two or more ways across the code or the wire.",
|
|
807
|
-
"mayIndicate": [
|
|
808
|
-
{ "case": "Names something", "points": [{ "rule": "one-word-everywhere" }] }
|
|
809
|
-
],
|
|
810
|
-
"breachUsuallySits": "in the vocabulary",
|
|
811
|
-
"recipes": ["domain-vocabulary-list"],
|
|
812
|
-
"correctUses": []
|
|
813
|
-
},
|
|
814
|
-
{
|
|
815
|
-
"name": "outside-dependency-vocabulary-for-basic-logic",
|
|
816
|
-
"title": "Outside dependency vocabulary for basic logic",
|
|
817
|
-
"seen": "An import of a utility or functional outside dependency (lodash, fp-ts) for branching, matching, transforming or results.",
|
|
818
|
-
"mayIndicate": [
|
|
819
|
-
{ "case": "Writes basic logic", "points": [{ "principle": "our-code-reads-in-the-common-language" }] },
|
|
820
|
-
{ "case": "Takes an outside dependency", "points": [{ "rule": "outside-dependencies-justified" }] }
|
|
821
|
-
],
|
|
822
|
-
"breachUsuallySits": "in the dependency",
|
|
823
|
-
"recipes": [],
|
|
824
|
-
"correctUses": []
|
|
825
|
-
},
|
|
826
|
-
{
|
|
827
|
-
"name": "duplicate-decision",
|
|
828
|
-
"title": "Duplicate decision",
|
|
829
|
-
"seen": "The same decision written in two or more places.",
|
|
830
|
-
"mayIndicate": [
|
|
831
|
-
{ "case": "Reuses behaviour", "points": [{ "rule": "one-reason-per-module" }] },
|
|
832
|
-
{ "case": "Puts code in a file", "points": [{ "rule": "one-reason-per-module" }] }
|
|
833
|
-
],
|
|
834
|
-
"breachUsuallySits": "where the decision's home should be; a clone only surfaces a candidate",
|
|
835
|
-
"recipes": ["entity-module", "screaming-folders"],
|
|
836
|
-
"correctUses": []
|
|
837
|
-
},
|
|
838
|
-
{
|
|
839
|
-
"name": "change-spread-across-modules",
|
|
840
|
-
"title": "Change spread across modules",
|
|
841
|
-
"seen": "One change for one reason touches many modules, or two modules always change together.",
|
|
842
|
-
"mayIndicate": [
|
|
843
|
-
{ "case": "Puts code in a file", "points": [{ "rule": "one-reason-per-module" }] }
|
|
844
|
-
],
|
|
845
|
-
"breachUsuallySits": "in the module boundaries",
|
|
846
|
-
"recipes": ["screaming-folders"],
|
|
847
|
-
"correctUses": []
|
|
848
|
-
},
|
|
849
|
-
{
|
|
850
|
-
"name": "floating-version",
|
|
851
|
-
"title": "Floating version",
|
|
852
|
-
"seen": "A range (`^`, `~`, `*`, `x`) or a tag (`latest`, `lts`) for an outside dependency, a runtime or a CI action.",
|
|
853
|
-
"mayIndicate": [
|
|
854
|
-
{ "case": "Takes an outside dependency", "points": [{ "rule": "fixed-versions" }] }
|
|
855
|
-
],
|
|
856
|
-
"breachUsuallySits": "in the manifest or workflow",
|
|
857
|
-
"recipes": ["exact-pins-and-a-lock-file"],
|
|
858
|
-
"correctUses": []
|
|
859
|
-
},
|
|
860
|
-
{
|
|
861
|
-
"name": "no-lock-file",
|
|
862
|
-
"title": "No lock file",
|
|
863
|
-
"seen": "A repository with dependencies and no committed lock file.",
|
|
864
|
-
"mayIndicate": [
|
|
865
|
-
{ "case": "Takes an outside dependency", "points": [{ "rule": "fixed-versions" }] }
|
|
866
|
-
],
|
|
867
|
-
"breachUsuallySits": "in the repository",
|
|
868
|
-
"recipes": ["exact-pins-and-a-lock-file"],
|
|
869
|
-
"correctUses": []
|
|
870
|
-
},
|
|
871
|
-
{
|
|
872
|
-
"name": "dependency-without-a-record",
|
|
873
|
-
"title": "Dependency without a record",
|
|
874
|
-
"seen": "A direct dependency, tools included, with no record of the native way weighed.",
|
|
875
|
-
"mayIndicate": [
|
|
876
|
-
{ "case": "Takes an outside dependency", "points": [{ "rule": "outside-dependencies-justified" }] }
|
|
877
|
-
],
|
|
878
|
-
"breachUsuallySits": "in the missing record",
|
|
879
|
-
"recipes": ["dependency-record"],
|
|
880
|
-
"correctUses": [{ "situation": "correct use", "kind": "dependency-record", "at": "naming the native way weighed and why it fell short" }]
|
|
881
|
-
},
|
|
882
|
-
{
|
|
883
|
-
"name": "tool-fetched-at-run-time",
|
|
884
|
-
"title": "Tool fetched at run time",
|
|
885
|
-
"seen": "`npx`, `dlx`, `bunx` or a download-and-run in a script, CI step or doc.",
|
|
886
|
-
"mayIndicate": [
|
|
887
|
-
{ "case": "Takes an outside dependency", "points": [{ "rule": "tools-live-in-the-repo" }] }
|
|
888
|
-
],
|
|
889
|
-
"breachUsuallySits": "in the script",
|
|
890
|
-
"recipes": ["repo-scripts-only"],
|
|
891
|
-
"correctUses": []
|
|
892
|
-
},
|
|
893
|
-
{
|
|
894
|
-
"name": "edit-inside-vendored-code",
|
|
895
|
-
"title": "Edit inside vendored code",
|
|
896
|
-
"seen": "A change to a file inside a vendored folder.",
|
|
897
|
-
"mayIndicate": [
|
|
898
|
-
{ "case": "Takes an outside dependency", "points": [{ "rule": "upstream-stays-untouched" }] }
|
|
899
|
-
],
|
|
900
|
-
"breachUsuallySits": "in the change",
|
|
901
|
-
"recipes": ["extension-outside-the-vendored-code"],
|
|
902
|
-
"correctUses": [{ "situation": "drift, an edit impossible to apply as an extension", "kind": "authorised-location", "at": "stating when to drop it" }]
|
|
903
|
-
},
|
|
904
|
-
{
|
|
905
|
-
"name": "bundled-dependency",
|
|
906
|
-
"title": "Bundled dependency",
|
|
907
|
-
"seen": "Published build output that holds a dependency's code that the package manifest does not declare.",
|
|
908
|
-
"mayIndicate": [
|
|
909
|
-
{ "case": "Ships code for others", "points": [{ "rule": "shipped-risk-declared" }] }
|
|
910
|
-
],
|
|
911
|
-
"breachUsuallySits": "in the build config",
|
|
912
|
-
"recipes": ["declared-not-bundled"],
|
|
913
|
-
"correctUses": []
|
|
914
|
-
}
|
|
915
|
-
],
|
|
916
|
-
"clauses": [
|
|
917
|
-
{ "clause": "CD-1#any-cast", "sight": { "kind": "one-symptom", "symptom": "claimed-type" } },
|
|
918
|
-
{ "clause": "CD-1#explicit-any", "sight": { "kind": "one-symptom", "symptom": "untyped-value" } },
|
|
919
|
-
{ "clause": "CD-1#implicit-any-let", "sight": { "kind": "one-symptom", "symptom": "untyped-value" } },
|
|
920
|
-
{ "clause": "CD-2#cast-expressions", "sight": { "kind": "one-symptom", "symptom": "claimed-type" } },
|
|
921
|
-
{ "clause": "CD-2#non-null-assertions", "sight": { "kind": "one-symptom", "symptom": "claimed-type" } },
|
|
922
|
-
{ "clause": "CD-3#strict", "sight": { "kind": "one-symptom", "symptom": "strictness-weakened" } },
|
|
923
|
-
{ "clause": "CD-3#no-unchecked-indexed-access", "sight": { "kind": "one-symptom", "symptom": "strictness-weakened" } },
|
|
924
|
-
{ "clause": "CD-3#exact-optional-property-types", "sight": { "kind": "one-symptom", "symptom": "strictness-weakened" } },
|
|
925
|
-
{ "clause": "CD-3#no-implicit-override", "sight": { "kind": "one-symptom", "symptom": "strictness-weakened" } },
|
|
926
|
-
{ "clause": "CD-3#no-fallthrough-cases-in-switch", "sight": { "kind": "one-symptom", "symptom": "strictness-weakened" } },
|
|
927
|
-
{ "clause": "CD-3#no-property-access-from-index-signature", "sight": { "kind": "one-symptom", "symptom": "strictness-weakened" } },
|
|
928
|
-
{ "clause": "CD-3#use-unknown-in-catch-variables", "sight": { "kind": "one-symptom", "symptom": "strictness-weakened" } },
|
|
929
|
-
{ "clause": "CD-4#boundary-validation", "sight": { "kind": "method", "recipe": "zod-at-the-producers-adapter", "outcomeSeenBy": ["schema-past-its-adapter"] } },
|
|
930
|
-
{ "clause": "CD-5#comments-directives", "sight": { "kind": "one-symptom", "symptom": "untracked-escape" } },
|
|
931
|
-
{ "clause": "CD-6#identifier-names", "sight": { "kind": "one-symptom", "symptom": "shorthand-name" } },
|
|
932
|
-
{ "clause": "CD-6#naming-convention", "sight": { "kind": "one-symptom", "symptom": "name-off-its-casing" } },
|
|
933
|
-
{ "clause": "CD-7#categorical-paths", "sight": { "kind": "one-symptom", "symptom": "drawer-path" } },
|
|
934
|
-
{ "clause": "CD-7#filename-case", "sight": { "kind": "one-symptom", "symptom": "name-off-its-casing" } },
|
|
935
|
-
{ "clause": "CD-7a#factory-return-types", "sight": { "kind": "one-symptom", "symptom": "type-derived-from-code" } },
|
|
936
|
-
{ "clause": "CD-8#switch-defaults", "sight": { "kind": "one-symptom", "symptom": "default-on-a-closed-union" } },
|
|
937
|
-
{ "clause": "CD-9#result-failures", "sight": { "kind": "method", "recipe": "result-union", "outcomeSeenBy": ["throw-between-our-units", "failure-shaped-as-success"] } },
|
|
938
|
-
{ "clause": "CD-10#throws-in-tests", "sight": { "kind": "one-symptom", "symptom": "throw-or-catch-in-a-test" } },
|
|
939
|
-
{ "clause": "CD-10#throw-only-error", "sight": { "kind": "one-symptom", "symptom": "thrown-non-error" } },
|
|
940
|
-
{ "clause": "CD-11#error-envelopes", "sight": { "kind": "method", "recipe": "result-union", "outcomeSeenBy": ["catch-all-failure-kind", "authored-class-or-this"] } },
|
|
941
|
-
{ "clause": "CD-12#repository-ports", "sight": { "kind": "method", "recipe": "port-in-the-domain", "outcomeSeenBy": ["port-outside-the-domain", "inner-layer-imports-outer"] } },
|
|
942
|
-
{ "clause": "CD-13#layer-boundaries", "sight": { "kind": "one-symptom", "symptom": "inner-layer-imports-outer" } },
|
|
943
|
-
{ "clause": "CD-14#class-syntax", "sight": { "kind": "one-symptom", "symptom": "authored-class-or-this" } },
|
|
944
|
-
{ "clause": "CD-14#static-only-class", "sight": { "kind": "one-symptom", "symptom": "authored-class-or-this" } },
|
|
945
|
-
{ "clause": "CD-14#library-construction", "sight": { "kind": "one-symptom", "symptom": "library-class-built-in-place" } },
|
|
946
|
-
{ "clause": "CD-15#loops", "sight": { "kind": "one-symptom", "symptom": "loop-keyword" } },
|
|
947
|
-
{ "clause": "CD-17#clock-sources", "sight": { "kind": "one-symptom", "symptom": "date-used-directly" } },
|
|
948
|
-
{ "clause": "CD-18#process-lifecycle-ports", "sight": { "kind": "one-symptom", "symptom": "process-global-used-in-place" } },
|
|
949
|
-
{ "clause": "CD-19#import-boundaries", "sight": { "kind": "one-symptom", "symptom": "outside-import-past-a-boundary" } },
|
|
950
|
-
{ "clause": "CD-21#default-factories", "sight": { "kind": "method", "recipe": "composition-root", "outcomeSeenBy": ["adapter-built-outside-the-root", "port-outside-the-domain"] } },
|
|
951
|
-
{ "clause": "CD-22#middleware-context", "sight": { "kind": "method", "recipe": "bounded-context-generic", "outcomeSeenBy": ["default-for-a-required-value"] } },
|
|
952
|
-
{ "clause": "CD-23#export-test-sibling", "sight": { "kind": "one-symptom", "symptom": "unit-without-a-running-test" } },
|
|
953
|
-
{ "clause": "CD-25#dependency-isolation", "sight": { "kind": "one-symptom", "symptom": "double-with-a-body" } },
|
|
954
|
-
{ "clause": "CD-26#module-mocking", "sight": { "kind": "one-symptom", "symptom": "module-or-global-patched" } },
|
|
955
|
-
{
|
|
956
|
-
"clause": "CD-27#test-body-logic",
|
|
957
|
-
"sight": {
|
|
958
|
-
"kind": "symptom-by-form",
|
|
959
|
-
"forms": [
|
|
960
|
-
{ "section": "branching-with-if", "symptom": "branch-in-a-test" },
|
|
961
|
-
{ "section": "a-try-block", "symptom": "throw-or-catch-in-a-test" },
|
|
962
|
-
{ "section": "a-ternary", "symptom": "branch-in-a-test" },
|
|
963
|
-
{ "section": "a-let", "symptom": "rebinding" },
|
|
964
|
-
{ "section": "a-method-that-picks-or-tests-an-element", "symptom": "computed-value-in-a-test" },
|
|
965
|
-
{ "section": "a-method-that-computes-a-value", "symptom": "computed-value-in-a-test" },
|
|
966
|
-
{ "section": "a-method-that-mutates", "symptom": "computed-value-in-a-test" },
|
|
967
|
-
{ "section": "a-short-circuit", "symptom": "branch-in-a-test" },
|
|
968
|
-
{ "section": "an-optional-chain-after-an-index", "symptom": "branch-in-a-test" },
|
|
969
|
-
{ "section": "an-optional-chain-on-a-mock-call", "symptom": "branch-in-a-test" },
|
|
970
|
-
{ "section": "an-optional-chain-on-a-mock-result", "symptom": "branch-in-a-test" },
|
|
971
|
-
{ "section": "an-optional-chain-on-a-property", "symptom": "branch-in-a-test" },
|
|
972
|
-
{ "section": "an-optional-call", "symptom": "branch-in-a-test" },
|
|
973
|
-
{ "section": "a-switch", "symptom": "branch-in-a-test" },
|
|
974
|
-
{ "section": "serialising-or-parsing-json", "symptom": "text-past-its-reader" },
|
|
975
|
-
{ "section": "merging-objects", "symptom": "computed-value-in-a-test" },
|
|
976
|
-
{ "section": "building-an-object-from-entries", "symptom": "computed-value-in-a-test" },
|
|
977
|
-
{ "section": "building-an-array-from-a-length", "symptom": "computed-value-in-a-test" },
|
|
978
|
-
{ "section": "a-math-call", "symptom": "computed-value-in-a-test" },
|
|
979
|
-
{ "section": "logic-inside-a-function-the-test-passes-on", "symptom": "double-with-a-body" }
|
|
980
|
-
]
|
|
981
|
-
}
|
|
982
|
-
},
|
|
983
|
-
{ "clause": "CD-27#focused-tests", "sight": { "kind": "one-symptom", "symptom": "test-switched-off" } },
|
|
984
|
-
{ "clause": "CD-27#skipped-tests", "sight": { "kind": "one-symptom", "symptom": "test-switched-off" } },
|
|
985
|
-
{ "clause": "CD-28#unit-responsibility", "sight": { "kind": "one-symptom", "symptom": "behaviour-tested-away-from-its-owner" } },
|
|
986
|
-
{ "clause": "CD-29#test-pyramid", "sight": { "kind": "one-symptom", "symptom": "integration-heavy-suite" } },
|
|
987
|
-
{ "clause": "CD-30#composition-only", "sight": { "kind": "one-symptom", "symptom": "behaviour-tested-away-from-its-owner" } },
|
|
988
|
-
{ "clause": "CD-31#no-coverage-thresholds", "sight": { "kind": "one-symptom", "symptom": "coverage-gate" } },
|
|
989
|
-
{ "clause": "CD-32#pii-redaction", "sight": { "kind": "outside-the-cases" } },
|
|
990
|
-
{ "clause": "CD-33#sensitive-brands", "sight": { "kind": "outside-the-cases" } },
|
|
991
|
-
{ "clause": "CD-34#no-repo-secrets", "sight": { "kind": "outside-the-cases" } },
|
|
992
|
-
{ "clause": "CD-39#cite-by-id", "sight": { "kind": "outside-the-cases" } },
|
|
993
|
-
{ "clause": "CD-40#parameter-count", "sight": { "kind": "one-symptom", "symptom": "positional-parameters" } },
|
|
994
|
-
{ "clause": "CD-40#named-object-argument", "sight": { "kind": "one-symptom", "symptom": "positional-parameters" } },
|
|
995
|
-
{ "clause": "CD-41#cognitive-complexity", "sight": { "kind": "one-symptom", "symptom": "tangled-function" } },
|
|
996
|
-
{ "clause": "CD-41#function-length", "sight": { "kind": "one-symptom", "symptom": "long-function" } },
|
|
997
|
-
{ "clause": "CD-41#orchestration-only", "sight": { "kind": "one-symptom", "symptom": "orchestrator-that-computes" } },
|
|
998
|
-
{ "clause": "CD-42#useless-else", "sight": { "kind": "one-symptom", "symptom": "work-inside-a-condition" } },
|
|
999
|
-
{ "clause": "CD-43#boolean-signatures", "sight": { "kind": "one-symptom", "symptom": "boolean-in-a-signature" } },
|
|
1000
|
-
{ "clause": "CD-44#parameter-mutation", "sight": { "kind": "one-symptom", "symptom": "write-into-a-parameter" } },
|
|
1001
|
-
{ "clause": "CD-44#parameter-reassignment", "sight": { "kind": "one-symptom", "symptom": "rebinding" } },
|
|
1002
|
-
{ "clause": "CD-45#parse-once", "sight": { "kind": "one-symptom", "symptom": "schema-past-its-adapter" } },
|
|
1003
|
-
{ "clause": "CD-47#hermetic-git-spawns", "sight": { "kind": "one-symptom", "symptom": "inherited-environment-in-a-subprocess" } }
|
|
1004
|
-
]
|
|
1005
|
-
}
|