@shivaedev/quality 0.69.5 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +3 -3
- package/dist/adapters/biome/browserDiagnostic.d.ts.map +1 -1
- package/dist/adapters/biome/browserDiagnostic.js +1 -1
- package/dist/adapters/biome/browserDiagnostic.js.map +1 -1
- package/dist/adapters/biome/configs.d.ts.map +1 -1
- package/dist/adapters/biome/configs.js +1 -1
- package/dist/adapters/biome/configs.js.map +1 -1
- package/dist/adapters/biome/presetConfig.d.ts.map +1 -1
- package/dist/adapters/biome/presetConfig.js +2 -2
- package/dist/adapters/biome/presetConfig.js.map +1 -1
- package/dist/adapters/biome/relocateConfig.js +1 -1
- package/dist/adapters/biome/relocateConfig.js.map +1 -1
- package/dist/adapters/biome/withExceptionConfig.js +2 -2
- package/dist/adapters/biome/withExceptionConfig.js.map +1 -1
- package/dist/adapters/bodyReferences.d.ts +1 -1
- package/dist/adapters/bodyReferences.d.ts.map +1 -1
- package/dist/adapters/bodyReferences.js +1 -1
- package/dist/adapters/bodyReferences.js.map +1 -1
- package/dist/adapters/buildEntryPaths.d.ts +1 -1
- package/dist/adapters/buildEntryPaths.d.ts.map +1 -1
- package/dist/adapters/buildEntryPaths.js +2 -2
- package/dist/adapters/buildEntryPaths.js.map +1 -1
- package/dist/adapters/buildHelper.d.ts +1 -1
- package/dist/adapters/buildHelper.d.ts.map +1 -1
- package/dist/adapters/buildHelper.js +2 -2
- package/dist/adapters/buildHelper.js.map +1 -1
- package/dist/adapters/bundlerEntries.d.ts.map +1 -1
- package/dist/adapters/bundlerEntries.js +4 -4
- package/dist/adapters/bundlerEntries.js.map +1 -1
- package/dist/adapters/changeKeyFindings.d.ts.map +1 -1
- package/dist/adapters/changeKeyFindings.js +1 -1
- package/dist/adapters/changeKeyFindings.js.map +1 -1
- package/dist/adapters/databaseUrlFindings.d.ts.map +1 -1
- package/dist/adapters/databaseUrlFindings.js +2 -2
- package/dist/adapters/databaseUrlFindings.js.map +1 -1
- package/dist/adapters/engineEscapes.js +2 -2
- package/dist/adapters/engineEscapes.js.map +1 -1
- package/dist/adapters/import-compiler/service.js +3 -3
- package/dist/adapters/import-compiler/service.js.map +1 -1
- package/dist/adapters/imports/departures.d.ts.map +1 -1
- package/dist/adapters/imports/departures.js +2 -24
- package/dist/adapters/imports/departures.js.map +1 -1
- package/dist/adapters/imports/fakeTargets.d.ts.map +1 -1
- package/dist/adapters/imports/fakeTargets.js +2 -2
- package/dist/adapters/imports/fakeTargets.js.map +1 -1
- package/dist/adapters/imports/graph.d.ts.map +1 -1
- package/dist/adapters/imports/graph.js +2 -2
- package/dist/adapters/imports/graph.js.map +1 -1
- package/dist/adapters/imports/resolve.d.ts +1 -1
- package/dist/adapters/imports/resolve.d.ts.map +1 -1
- package/dist/adapters/imports/resolve.js.map +1 -1
- package/dist/adapters/knip/configuration.d.ts.map +1 -1
- package/dist/adapters/knip/configuration.js +2 -2
- package/dist/adapters/knip/configuration.js.map +1 -1
- package/dist/adapters/knip/report.d.ts.map +1 -1
- package/dist/adapters/knip/report.js +1 -1
- package/dist/adapters/knip/report.js.map +1 -1
- package/dist/adapters/knip/run.d.ts.map +1 -1
- package/dist/adapters/knip/run.js +5 -5
- package/dist/adapters/knip/run.js.map +1 -1
- package/dist/adapters/moduleResolver.js +1 -1
- package/dist/adapters/moduleResolver.js.map +1 -1
- package/dist/adapters/nativeTransactionFindings.d.ts.map +1 -1
- package/dist/adapters/nativeTransactionFindings.js +1 -1
- package/dist/adapters/nativeTransactionFindings.js.map +1 -1
- package/dist/adapters/positiveRefusalFindings.d.ts.map +1 -1
- package/dist/adapters/positiveRefusalFindings.js +1 -1
- package/dist/adapters/positiveRefusalFindings.js.map +1 -1
- package/dist/adapters/queueReadoutFindings.d.ts.map +1 -1
- package/dist/adapters/queueReadoutFindings.js +3 -3
- package/dist/adapters/queueReadoutFindings.js.map +1 -1
- package/dist/adapters/reachableBuildEntries.d.ts.map +1 -1
- package/dist/adapters/reachableBuildEntries.js +3 -3
- package/dist/adapters/reachableBuildEntries.js.map +1 -1
- package/dist/adapters/rule.d.ts +1 -1
- package/dist/adapters/rule.d.ts.map +1 -1
- package/dist/adapters/rule.js +1 -1
- package/dist/adapters/rule.js.map +1 -1
- package/dist/adapters/serviceAccess.d.ts +1 -1
- package/dist/adapters/serviceAccess.d.ts.map +1 -1
- package/dist/adapters/spawnedEntries.d.ts.map +1 -1
- package/dist/adapters/spawnedEntries.js +3 -3
- package/dist/adapters/spawnedEntries.js.map +1 -1
- package/dist/adapters/specReaderSources.d.ts.map +1 -1
- package/dist/adapters/specReaderSources.js +1 -1
- package/dist/adapters/specReaderSources.js.map +1 -1
- package/dist/adapters/testProjects.js +1 -1
- package/dist/adapters/testProjects.js.map +1 -1
- package/dist/adapters/units/runtime.d.ts.map +1 -1
- package/dist/adapters/units/runtime.js +2 -2
- package/dist/adapters/units/runtime.js.map +1 -1
- package/dist/adapters/units/runtimeOrigins.d.ts +1 -1
- package/dist/adapters/units/runtimeOrigins.d.ts.map +1 -1
- package/dist/adapters/units/runtimeOrigins.js +1 -1
- package/dist/adapters/units/runtimeOrigins.js.map +1 -1
- package/dist/adapters/units/runtimeUse.d.ts +1 -1
- package/dist/adapters/units/runtimeUse.d.ts.map +1 -1
- package/dist/adapters/units/runtimeUse.js +1 -1
- package/dist/adapters/units/runtimeUse.js.map +1 -1
- package/dist/baseline/compare.d.ts +1 -1
- package/dist/baseline/compare.d.ts.map +1 -1
- package/dist/baseline/compare.js.map +1 -1
- package/dist/baseline/legacy.d.ts +1 -1
- package/dist/baseline/legacy.d.ts.map +1 -1
- package/dist/baseline/legacy.js +1 -1
- package/dist/baseline/legacy.js.map +1 -1
- package/dist/baseline/looseStagedEntries.d.ts +1 -1
- package/dist/baseline/looseStagedEntries.d.ts.map +1 -1
- package/dist/baseline/looseStagedEntries.js +3 -3
- package/dist/baseline/looseStagedEntries.js.map +1 -1
- package/dist/baseline/rewrite.d.ts +1 -1
- package/dist/baseline/rewrite.d.ts.map +1 -1
- package/dist/baseline/rewrite.js +1 -1
- package/dist/baseline/rewrite.js.map +1 -1
- package/dist/baseline/update.d.ts +1 -1
- package/dist/baseline/update.d.ts.map +1 -1
- package/dist/baseline/update.js +1 -1
- package/dist/baseline/update.js.map +1 -1
- package/dist/biome/nativeEffectCall.d.ts +1 -1
- package/dist/biome/nativeEffectCall.d.ts.map +1 -1
- package/dist/biome/recognizeDiagnostics.d.ts +1 -1
- package/dist/biome/recognizeDiagnostics.d.ts.map +1 -1
- package/dist/biome/recognizeDiagnostics.js +2 -2
- package/dist/biome/recognizeDiagnostics.js.map +1 -1
- package/dist/biome/report.d.ts.map +1 -1
- package/dist/biome/report.js +1 -1
- package/dist/biome/report.js.map +1 -1
- package/dist/biome/withoutEntryPointImports.d.ts.map +1 -1
- package/dist/biome/withoutEntryPointImports.js.map +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/fix.d.ts.map +1 -1
- package/dist/cli/fix.js +1 -1
- package/dist/cli/fix.js.map +1 -1
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +1 -1
- package/dist/cli/program.js.map +1 -1
- package/dist/cli/shrink.d.ts.map +1 -1
- package/dist/cli/shrink.js +1 -1
- package/dist/cli/shrink.js.map +1 -1
- package/dist/config/load.d.ts +1 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +3 -3
- package/dist/config/load.js.map +1 -1
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js.map +1 -1
- package/dist/decoded.d.ts +1 -1
- package/dist/decoded.d.ts.map +1 -1
- package/dist/decoded.js +1 -1
- package/dist/decoded.js.map +1 -1
- package/dist/docs/documentedImports.js +1 -1
- package/dist/docs/documentedImports.js.map +1 -1
- package/dist/docs/headingAnchors.d.ts +1 -1
- package/dist/docs/headingAnchors.d.ts.map +1 -1
- package/dist/docs/importFindings.d.ts.map +1 -1
- package/dist/docs/importFindings.js +3 -3
- package/dist/docs/importFindings.js.map +1 -1
- package/dist/docs/linkFindings.d.ts +2 -2
- package/dist/docs/linkFindings.d.ts.map +1 -1
- package/dist/docs/linkFindings.js +2 -2
- package/dist/docs/linkFindings.js.map +1 -1
- package/dist/docs/markdownLinks.d.ts +1 -1
- package/dist/docs/markdownLinks.d.ts.map +1 -1
- package/dist/docs/markdownLinks.js +1 -1
- package/dist/docs/markdownLinks.js.map +1 -1
- package/dist/engine/evaluate.d.ts +1 -1
- package/dist/engine/evaluate.d.ts.map +1 -1
- package/dist/engine/evaluate.js +1 -1
- package/dist/engine/evaluate.js.map +1 -1
- package/dist/engine/runRules.d.ts +1 -1
- package/dist/engine/runRules.d.ts.map +1 -1
- package/dist/engine/runRules.js.map +1 -1
- package/dist/engine/session.d.ts +2 -2
- package/dist/engine/session.d.ts.map +1 -1
- package/dist/engine/session.js +2 -2
- package/dist/engine/session.js.map +1 -1
- package/dist/exceptions/migrateConfig.d.ts +1 -1
- package/dist/exceptions/migrateConfig.d.ts.map +1 -1
- package/dist/exceptions/registryEntries.d.ts +2 -2
- package/dist/exceptions/registryEntries.d.ts.map +1 -1
- package/dist/git/base.js +1 -1
- package/dist/git/base.js.map +1 -1
- package/dist/git/history.js +1 -1
- package/dist/git/history.js.map +1 -1
- package/dist/hooks/forwarding.js +2 -2
- package/dist/hooks/forwarding.js.map +1 -1
- package/dist/hooks/install.d.ts +1 -1
- package/dist/hooks/install.d.ts.map +1 -1
- package/dist/hooks/install.js +5 -5
- package/dist/hooks/install.js.map +1 -1
- package/dist/hooks/setup.d.ts +1 -1
- package/dist/hooks/setup.d.ts.map +1 -1
- package/dist/hooks/setup.js +1 -1
- package/dist/hooks/setup.js.map +1 -1
- package/dist/hooks/shim.d.ts +1 -1
- package/dist/hooks/shim.d.ts.map +1 -1
- package/dist/hooks/shim.js +1 -1
- package/dist/hooks/shim.js.map +1 -1
- package/dist/hooks/status.d.ts +1 -1
- package/dist/hooks/status.d.ts.map +1 -1
- package/dist/hooks/status.js +3 -3
- package/dist/hooks/status.js.map +1 -1
- package/dist/hooks/uninstall.js +3 -3
- package/dist/hooks/uninstall.js.map +1 -1
- package/dist/imports/adminEvidence.d.ts.map +1 -1
- package/dist/imports/adminEvidence.js +1 -1
- package/dist/imports/adminEvidence.js.map +1 -1
- package/dist/imports/adminFindings.d.ts +1 -1
- package/dist/imports/adminFindings.d.ts.map +1 -1
- package/dist/imports/adminFindings.js +1 -1
- package/dist/imports/adminFindings.js.map +1 -1
- package/dist/imports/browserGlobals.d.ts.map +1 -1
- package/dist/imports/browserGlobals.js +1 -1
- package/dist/imports/browserGlobals.js.map +1 -1
- package/dist/imports/classifyRuntime.d.ts +2 -2
- package/dist/imports/classifyRuntime.d.ts.map +1 -1
- package/dist/imports/classifyRuntime.js +2 -2
- package/dist/imports/classifyRuntime.js.map +1 -1
- package/dist/imports/departures.d.ts +1 -1
- package/dist/imports/departures.d.ts.map +1 -1
- package/dist/imports/departures.js +1 -1
- package/dist/imports/departures.js.map +1 -1
- package/dist/imports/fences/check.d.ts +1 -1
- package/dist/imports/fences/check.d.ts.map +1 -1
- package/dist/imports/fences/check.js +2 -2
- package/dist/imports/fences/check.js.map +1 -1
- package/dist/imports/fences/compilePolicy.d.ts +3 -3
- package/dist/imports/fences/compilePolicy.d.ts.map +1 -1
- package/dist/imports/fences/compilePolicy.js +1 -1
- package/dist/imports/fences/compilePolicy.js.map +1 -1
- package/dist/imports/fences/declarations.d.ts +1 -1
- package/dist/imports/fences/declarations.d.ts.map +1 -1
- package/dist/imports/fences/discover.d.ts +1 -1
- package/dist/imports/fences/discover.d.ts.map +1 -1
- package/dist/imports/fences/discover.js +1 -1
- package/dist/imports/fences/discover.js.map +1 -1
- package/dist/imports/fences/evaluate.d.ts +2 -2
- package/dist/imports/fences/evaluate.d.ts.map +1 -1
- package/dist/imports/fences/evaluate.js +3 -3
- package/dist/imports/fences/evaluate.js.map +1 -1
- package/dist/imports/fences/match.d.ts +1 -1
- package/dist/imports/fences/match.d.ts.map +1 -1
- package/dist/imports/fences/match.js.map +1 -1
- package/dist/imports/fences/reach.d.ts +1 -1
- package/dist/imports/fences/reach.d.ts.map +1 -1
- package/dist/imports/fences/selectors.d.ts +1 -1
- package/dist/imports/fences/selectors.d.ts.map +1 -1
- package/dist/imports/fences/vocabulary.d.ts +2 -2
- package/dist/imports/fences/vocabulary.d.ts.map +1 -1
- package/dist/imports/fences/vocabulary.js +1 -1
- package/dist/imports/fences/vocabulary.js.map +1 -1
- package/dist/imports/graph.d.ts +3 -3
- package/dist/imports/graph.d.ts.map +1 -1
- package/dist/imports/graph.js +1 -1
- package/dist/imports/graph.js.map +1 -1
- package/dist/imports/nodePlatformBarrels.d.ts.map +1 -1
- package/dist/imports/nodePlatformBarrels.js +1 -1
- package/dist/imports/nodePlatformBarrels.js.map +1 -1
- package/dist/imports/runtime.d.ts +1 -1
- package/dist/imports/runtime.d.ts.map +1 -1
- package/dist/imports/runtime.js +1 -1
- package/dist/imports/runtime.js.map +1 -1
- package/dist/imports/testComposition.d.ts +2 -2
- package/dist/imports/testComposition.d.ts.map +1 -1
- package/dist/imports/testComposition.js +1 -1
- package/dist/imports/testComposition.js.map +1 -1
- package/dist/imports/withoutGenerated.d.ts +2 -2
- package/dist/imports/withoutGenerated.d.ts.map +1 -1
- package/dist/imports/withoutGenerated.js.map +1 -1
- package/dist/imports/workspace.d.ts.map +1 -1
- package/dist/imports/workspace.js +2 -2
- package/dist/imports/workspace.js.map +1 -1
- package/dist/inventory/collect.d.ts +1 -1
- package/dist/inventory/collect.d.ts.map +1 -1
- package/dist/inventory/collect.js +6 -6
- package/dist/inventory/collect.js.map +1 -1
- package/dist/inventory/routeFiles.d.ts +1 -1
- package/dist/inventory/routeFiles.d.ts.map +1 -1
- package/dist/inventory/routeFiles.js +3 -3
- package/dist/inventory/routeFiles.js.map +1 -1
- package/dist/inventory/walk.d.ts +2 -2
- package/dist/inventory/walk.d.ts.map +1 -1
- package/dist/inventory/walk.js +3 -3
- package/dist/inventory/walk.js.map +1 -1
- package/dist/naming/isMigrationFile.js +1 -1
- package/dist/naming/isMigrationFile.js.map +1 -1
- package/dist/naming/nativeNames.js +1 -1
- package/dist/naming/nativeNames.js.map +1 -1
- package/dist/naming/testCode.d.ts.map +1 -1
- package/dist/naming/testCode.js +3 -3
- package/dist/naming/testCode.js.map +1 -1
- package/dist/report/render.js +2 -2
- package/dist/report/render.js.map +1 -1
- package/dist/report/staleSections.js +1 -1
- package/dist/report/staleSections.js.map +1 -1
- package/dist/rules/builtIn.js +12 -12
- package/dist/rules/builtIn.js.map +1 -1
- package/dist/rules/comments/definePattern.js +2 -2
- package/dist/rules/comments/definePattern.js.map +1 -1
- package/dist/rules/comments/kinds.d.ts +1 -1
- package/dist/rules/comments/kinds.d.ts.map +1 -1
- package/dist/rules/comments/kinds.js.map +1 -1
- package/dist/rules/comments/maxPerFile.js +2 -2
- package/dist/rules/comments/maxPerFile.js.map +1 -1
- package/dist/rules/comments/noBanner.js +1 -1
- package/dist/rules/comments/noBanner.js.map +1 -1
- package/dist/rules/comments/noEnvironmentPragma.js +1 -1
- package/dist/rules/comments/noEnvironmentPragma.js.map +1 -1
- package/dist/rules/comments/noJsdoc.js +2 -2
- package/dist/rules/comments/noJsdoc.js.map +1 -1
- package/dist/rules/comments/noLineReference.js +1 -1
- package/dist/rules/comments/noLineReference.js.map +1 -1
- package/dist/rules/comments/noPrReference.js +1 -1
- package/dist/rules/comments/noPrReference.js.map +1 -1
- package/dist/rules/comments/noTodo.js +1 -1
- package/dist/rules/comments/noTodo.js.map +1 -1
- package/dist/rules/effect/failureFindings.js +2 -2
- package/dist/rules/effect/failureFindings.js.map +1 -1
- package/dist/rules/effect/failureHonesty.js +2 -2
- package/dist/rules/effect/failureHonesty.js.map +1 -1
- package/dist/rules/effect/failureOperations.js +1 -1
- package/dist/rules/effect/failureOperations.js.map +1 -1
- package/dist/rules/effect/successRecovery.js +1 -1
- package/dist/rules/effect/successRecovery.js.map +1 -1
- package/dist/rules/files/otherNames.js +1 -1
- package/dist/rules/files/otherNames.js.map +1 -1
- package/dist/rules/files/stylesheetImporters.js +1 -1
- package/dist/rules/files/stylesheetImporters.js.map +1 -1
- package/dist/rules/imports/aliased.js +5 -5
- package/dist/rules/imports/aliased.js.map +1 -1
- package/dist/rules/imports/manifest.js +1 -1
- package/dist/rules/imports/manifest.js.map +1 -1
- package/dist/rules/manifestsDependencyPins.d.ts.map +1 -1
- package/dist/rules/manifestsDependencyPins.js +2 -3
- package/dist/rules/manifestsDependencyPins.js.map +1 -1
- package/dist/rules/noBarrel.js +2 -2
- package/dist/rules/noBarrel.js.map +1 -1
- package/dist/rules/react/jsxConditionals.js +1 -1
- package/dist/rules/react/jsxConditionals.js.map +1 -1
- package/dist/rules/secondNames.js +1 -1
- package/dist/rules/secondNames.js.map +1 -1
- package/dist/rules/stories/adapterOnlyFakes.js +1 -1
- package/dist/rules/stories/adapterOnlyFakes.js.map +1 -1
- package/dist/rules/stories/adapters/authTables.d.ts.map +1 -1
- package/dist/rules/stories/adapters/authTables.js +1 -1
- package/dist/rules/stories/adapters/authTables.js.map +1 -1
- package/dist/rules/stories/adapters/realTime.d.ts.map +1 -1
- package/dist/rules/stories/adapters/realTime.js +1 -1
- package/dist/rules/stories/adapters/realTime.js.map +1 -1
- package/dist/rules/stories/adapters/sqlTables.js +1 -1
- package/dist/rules/stories/adapters/sqlTables.js.map +1 -1
- package/dist/rules/stories/authSql.js +2 -2
- package/dist/rules/stories/authSql.js.map +1 -1
- package/dist/rules/stories/domainOutcomes.js +4 -4
- package/dist/rules/stories/domainOutcomes.js.map +1 -1
- package/dist/rules/stories/engine.js +4 -4
- package/dist/rules/stories/engine.js.map +1 -1
- package/dist/rules/stories/fakeImplementation.js +1 -1
- package/dist/rules/stories/fakeImplementation.js.map +1 -1
- package/dist/rules/stories/fakeReplacements.js +2 -2
- package/dist/rules/stories/fakeReplacements.js.map +1 -1
- package/dist/rules/stories/globalRetries.js +3 -3
- package/dist/rules/stories/globalRetries.js.map +1 -1
- package/dist/rules/stories/groupedOutcomes.js +3 -3
- package/dist/rules/stories/groupedOutcomes.js.map +1 -1
- package/dist/rules/stories/httpStatus.js +2 -2
- package/dist/rules/stories/httpStatus.js.map +1 -1
- package/dist/rules/stories/namedValues.js +2 -2
- package/dist/rules/stories/namedValues.js.map +1 -1
- package/dist/rules/stories/noExpect.js +2 -2
- package/dist/rules/stories/noExpect.js.map +1 -1
- package/dist/rules/stories/noLimitImports.js +2 -2
- package/dist/rules/stories/noLimitImports.js.map +1 -1
- package/dist/rules/stories/origins.d.ts +1 -1
- package/dist/rules/stories/origins.d.ts.map +1 -1
- package/dist/rules/stories/origins.js +4 -4
- package/dist/rules/stories/origins.js.map +1 -1
- package/dist/rules/stories/positiveRefusals.js +2 -2
- package/dist/rules/stories/positiveRefusals.js.map +1 -1
- package/dist/rules/stories/queueSql.js +1 -1
- package/dist/rules/stories/queueSql.js.map +1 -1
- package/dist/rules/stories/registersTests.js +1 -1
- package/dist/rules/stories/registersTests.js.map +1 -1
- package/dist/rules/stories/retryOption.js +1 -1
- package/dist/rules/stories/retryOption.js.map +1 -1
- package/dist/rules/stories/setup.js +1 -1
- package/dist/rules/stories/setup.js.map +1 -1
- package/dist/rules/stories/sources.js +2 -2
- package/dist/rules/stories/sources.js.map +1 -1
- package/dist/rules/stories/specHelpers.js +2 -2
- package/dist/rules/stories/specHelpers.js.map +1 -1
- package/dist/rules/stories/specs.js +3 -3
- package/dist/rules/stories/specs.js.map +1 -1
- package/dist/rules/stories/sqlText.js +1 -1
- package/dist/rules/stories/sqlText.js.map +1 -1
- package/dist/rules/stories/unitTests.js +3 -3
- package/dist/rules/stories/unitTests.js.map +1 -1
- package/dist/rules/stories/waitOnEvents.js +3 -3
- package/dist/rules/stories/waitOnEvents.js.map +1 -1
- package/dist/rules/suppressions/biome/ConsumerDeclaration.js +1 -1
- package/dist/rules/suppressions/biome/ConsumerDeclaration.js.map +1 -1
- package/dist/rules/suppressions/biome/weakenings.js +2 -2
- package/dist/rules/suppressions/biome/weakenings.js.map +1 -1
- package/dist/rules/suppressions/noDoubleCast.js +2 -2
- package/dist/rules/suppressions/noDoubleCast.js.map +1 -1
- package/dist/rules/suppressions/noInline.js +2 -2
- package/dist/rules/suppressions/noInline.js.map +1 -1
- package/dist/testing/adapters/hookRepository.d.ts +2 -2
- package/dist/testing/adapters/hookRepository.d.ts.map +1 -1
- package/dist/testing/adapters/hookRepository.js +5 -5
- package/dist/testing/adapters/hookRepository.js.map +1 -1
- package/dist/testing/adapters/packageExports.d.ts +1 -1
- package/dist/testing/adapters/packageExports.d.ts.map +1 -1
- package/dist/testing/adapters/qualityTree.d.ts +1 -1
- package/dist/testing/adapters/qualityTree.d.ts.map +1 -1
- package/dist/testing/adapters/qualityTree.js +1 -1
- package/dist/testing/adapters/qualityTree.js.map +1 -1
- package/dist/testing/adapters/storySpecFiles.d.ts +1 -1
- package/dist/testing/adapters/storySpecFiles.d.ts.map +1 -1
- package/dist/testing/adapters/writePackageExports.js +1 -1
- package/dist/testing/adapters/writePackageExports.js.map +1 -1
- package/package.json +1 -1
- package/src/adapters/biome/browserDiagnostic.ts +1 -1
- package/src/adapters/biome/configs.ts +1 -1
- package/src/adapters/biome/presetConfig.ts +2 -2
- package/src/adapters/biome/relocateConfig.ts +1 -1
- package/src/adapters/biome/withExceptionConfig.ts +2 -2
- package/src/adapters/bodyReferences.ts +1 -1
- package/src/adapters/buildEntryPaths.ts +2 -2
- package/src/adapters/buildHelper.ts +2 -2
- package/src/adapters/bundlerEntries.ts +4 -4
- package/src/adapters/changeKeyFindings.ts +1 -1
- package/src/adapters/databaseUrlFindings.ts +2 -2
- package/src/adapters/engineEscapes.ts +3 -3
- package/src/adapters/import-compiler/service.ts +3 -3
- package/src/adapters/imports/departures.ts +2 -29
- package/src/adapters/imports/fakeTargets.ts +2 -2
- package/src/adapters/imports/graph.ts +2 -2
- package/src/adapters/imports/resolve.ts +1 -1
- package/src/adapters/knip/configuration.ts +2 -2
- package/src/adapters/knip/report.ts +1 -1
- package/src/adapters/knip/run.ts +5 -5
- package/src/adapters/moduleResolver.ts +1 -1
- package/src/adapters/nativeTransactionFindings.ts +1 -1
- package/src/adapters/positiveRefusalFindings.ts +1 -1
- package/src/adapters/queueReadoutFindings.ts +3 -3
- package/src/adapters/reachableBuildEntries.ts +3 -3
- package/src/adapters/rule.ts +1 -1
- package/src/adapters/serviceAccess.ts +1 -1
- package/src/adapters/spawnedEntries.ts +3 -3
- package/src/adapters/specReaderSources.ts +1 -1
- package/src/adapters/testProjects.ts +1 -1
- package/src/adapters/units/runtime.ts +2 -2
- package/src/adapters/units/runtimeOrigins.ts +1 -1
- package/src/adapters/units/runtimeUse.ts +1 -1
- package/src/baseline/compare.ts +1 -1
- package/src/baseline/legacy.ts +2 -2
- package/src/baseline/looseStagedEntries.ts +3 -3
- package/src/baseline/rewrite.ts +1 -1
- package/src/baseline/update.ts +2 -2
- package/src/biome/nativeEffectCall.ts +1 -1
- package/src/biome/recognizeDiagnostics.ts +3 -3
- package/src/biome/report.ts +1 -1
- package/src/biome/withoutEntryPointImports.ts +1 -1
- package/src/cli/args.ts +2 -2
- package/src/cli/fix.ts +1 -1
- package/src/cli/program.ts +1 -1
- package/src/cli/shrink.ts +1 -1
- package/src/config/load.ts +3 -3
- package/src/config/resolve.ts +1 -1
- package/src/decoded.ts +1 -1
- package/src/docs/documentedImports.ts +1 -1
- package/src/docs/headingAnchors.ts +1 -1
- package/src/docs/importFindings.ts +3 -3
- package/src/docs/linkFindings.ts +3 -3
- package/src/docs/markdownLinks.ts +1 -1
- package/src/engine/evaluate.ts +1 -1
- package/src/engine/runRules.ts +1 -1
- package/src/engine/session.ts +3 -3
- package/src/exceptions/migrateConfig.ts +1 -1
- package/src/exceptions/registryEntries.ts +2 -2
- package/src/git/base.ts +1 -1
- package/src/git/history.ts +1 -1
- package/src/hooks/forwarding.ts +2 -2
- package/src/hooks/install.ts +5 -5
- package/src/hooks/setup.ts +1 -1
- package/src/hooks/shim.ts +1 -1
- package/src/hooks/status.ts +3 -3
- package/src/hooks/uninstall.ts +3 -3
- package/src/imports/adminEvidence.ts +1 -1
- package/src/imports/adminFindings.ts +2 -2
- package/src/imports/browserGlobals.ts +1 -1
- package/src/imports/classifyRuntime.ts +3 -3
- package/src/imports/departures.ts +2 -2
- package/src/imports/fences/check.ts +3 -3
- package/src/imports/fences/compilePolicy.ts +3 -3
- package/src/imports/fences/declarations.ts +1 -1
- package/src/imports/fences/discover.ts +2 -2
- package/src/imports/fences/evaluate.ts +4 -4
- package/src/imports/fences/match.ts +1 -1
- package/src/imports/fences/reach.ts +1 -1
- package/src/imports/fences/selectors.ts +1 -1
- package/src/imports/fences/vocabulary.ts +2 -2
- package/src/imports/graph.ts +3 -3
- package/src/imports/nodePlatformBarrels.ts +1 -1
- package/src/imports/runtime.ts +2 -2
- package/src/imports/testComposition.ts +2 -2
- package/src/imports/withoutGenerated.ts +1 -1
- package/src/imports/workspace.ts +2 -2
- package/src/inventory/collect.ts +6 -6
- package/src/inventory/routeFiles.ts +3 -3
- package/src/inventory/walk.ts +3 -3
- package/src/naming/isMigrationFile.ts +1 -1
- package/src/naming/nativeNames.ts +1 -1
- package/src/naming/testCode.ts +3 -3
- package/src/report/render.ts +2 -2
- package/src/report/staleSections.ts +1 -1
- package/src/rules/builtIn.ts +12 -12
- package/src/rules/comments/definePattern.ts +2 -2
- package/src/rules/comments/kinds.ts +1 -1
- package/src/rules/comments/maxPerFile.ts +2 -2
- package/src/rules/comments/noBanner.ts +1 -1
- package/src/rules/comments/noEnvironmentPragma.ts +1 -1
- package/src/rules/comments/noJsdoc.ts +2 -2
- package/src/rules/comments/noLineReference.ts +1 -1
- package/src/rules/comments/noPrReference.ts +1 -1
- package/src/rules/comments/noTodo.ts +1 -1
- package/src/rules/effect/failureFindings.ts +2 -2
- package/src/rules/effect/failureHonesty.ts +2 -2
- package/src/rules/effect/failureOperations.ts +1 -1
- package/src/rules/effect/successRecovery.ts +1 -1
- package/src/rules/files/otherNames.ts +1 -1
- package/src/rules/files/stylesheetImporters.ts +1 -1
- package/src/rules/imports/aliased.ts +5 -5
- package/src/rules/imports/manifest.ts +1 -1
- package/src/rules/manifestsDependencyPins.ts +2 -3
- package/src/rules/noBarrel.ts +2 -2
- package/src/rules/react/jsxConditionals.ts +1 -1
- package/src/rules/secondNames.ts +1 -1
- package/src/rules/stories/adapterOnlyFakes.ts +1 -1
- package/src/rules/stories/adapters/authTables.ts +1 -1
- package/src/rules/stories/adapters/realTime.ts +1 -1
- package/src/rules/stories/adapters/sqlTables.ts +1 -1
- package/src/rules/stories/authSql.ts +2 -2
- package/src/rules/stories/domainOutcomes.ts +4 -4
- package/src/rules/stories/engine.ts +4 -4
- package/src/rules/stories/fakeImplementation.ts +1 -1
- package/src/rules/stories/fakeReplacements.ts +2 -2
- package/src/rules/stories/globalRetries.ts +4 -4
- package/src/rules/stories/groupedOutcomes.ts +3 -3
- package/src/rules/stories/httpStatus.ts +2 -2
- package/src/rules/stories/namedValues.ts +2 -2
- package/src/rules/stories/noExpect.ts +2 -2
- package/src/rules/stories/noLimitImports.ts +2 -2
- package/src/rules/stories/origins.ts +4 -4
- package/src/rules/stories/positiveRefusals.ts +2 -2
- package/src/rules/stories/queueSql.ts +1 -1
- package/src/rules/stories/registersTests.ts +1 -1
- package/src/rules/stories/retryOption.ts +1 -1
- package/src/rules/stories/setup.ts +1 -1
- package/src/rules/stories/sources.ts +2 -2
- package/src/rules/stories/specHelpers.ts +2 -2
- package/src/rules/stories/specs.ts +3 -3
- package/src/rules/stories/sqlText.ts +1 -1
- package/src/rules/stories/unitTests.ts +3 -3
- package/src/rules/stories/waitOnEvents.ts +3 -3
- package/src/rules/suppressions/biome/ConsumerDeclaration.ts +1 -1
- package/src/rules/suppressions/biome/weakenings.ts +2 -2
- package/src/rules/suppressions/noDoubleCast.ts +2 -2
- package/src/rules/suppressions/noInline.ts +2 -2
- package/src/testing/adapters/hookRepository.ts +5 -9
- package/src/testing/adapters/packageExports.ts +1 -1
- package/src/testing/adapters/qualityTree.ts +1 -1
- package/src/testing/adapters/storySpecFiles.ts +1 -1
- package/src/testing/adapters/writePackageExports.ts +1 -1
package/src/inventory/walk.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { dirname, join, relative, sep } from "node:path";
|
|
2
2
|
import { Effect, FileSystem } from "effect";
|
|
3
3
|
import type { SetupFailure } from "#failure.ts";
|
|
4
|
+
import { type FilesystemFailure, orWhenAbsent, readOptionalText } from "#inventory/filesystem.ts";
|
|
5
|
+
import { emptyScope, type IgnoreScope, insideKept, verdictFor, withIgnoreFile } from "#inventory/ignoreScope.ts";
|
|
6
|
+
import { ignoredPaths, trackedPaths } from "#inventory/trackedPaths.ts";
|
|
4
7
|
import type { RuleServices } from "#rule.ts";
|
|
5
|
-
import { type FilesystemFailure, orWhenAbsent, readOptionalText } from "./filesystem.ts";
|
|
6
|
-
import { emptyScope, type IgnoreScope, insideKept, verdictFor, withIgnoreFile } from "./ignoreScope.ts";
|
|
7
|
-
import { ignoredPaths, trackedPaths } from "./trackedPaths.ts";
|
|
8
8
|
|
|
9
9
|
const SKIPPED = new Set([".git", ".worktrees", "node_modules"]);
|
|
10
10
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { posix } from "node:path";
|
|
2
|
-
import { moduleRoot } from "
|
|
2
|
+
import { moduleRoot } from "#naming/moduleRoot.ts";
|
|
3
3
|
|
|
4
4
|
export const MIGRATIONS_DIRECTORY = "src/server/migrations";
|
|
5
5
|
export const MIGRATION_FILE_PATTERN = /^[0-9]{4}_[a-z][a-z0-9]*(?:_[a-z0-9]+)*\.ts$/u;
|
package/src/naming/testCode.ts
CHANGED
|
@@ -5,10 +5,10 @@ import { importGraph } from "#imports/graph.ts";
|
|
|
5
5
|
import { isTooling } from "#imports/isTooling.ts";
|
|
6
6
|
import { testComposition } from "#imports/testComposition.ts";
|
|
7
7
|
import { packageOf } from "#imports/workspace.ts";
|
|
8
|
+
import { developmentCode } from "#naming/developmentCode.ts";
|
|
9
|
+
import { packageTests } from "#naming/packageTests.ts";
|
|
10
|
+
import { isTestCode } from "#naming/testName.ts";
|
|
8
11
|
import type { RuleInputs } from "#rule.ts";
|
|
9
|
-
import { developmentCode } from "./developmentCode.ts";
|
|
10
|
-
import { packageTests } from "./packageTests.ts";
|
|
11
|
-
import { isTestCode } from "./testName.ts";
|
|
12
12
|
|
|
13
13
|
export const testCode = Effect.fn("Tests.testCode")(function* (inputs: RuleInputs) {
|
|
14
14
|
const posix = yield* Path.Path.pipe(Effect.provide(Path.layer));
|
package/src/report/render.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Regression } from "#baseline/compare.ts";
|
|
2
2
|
import { type Outcome, passes } from "#engine/evaluate.ts";
|
|
3
3
|
import { groupBy, keyOf, type Violation } from "#engine/violation.ts";
|
|
4
|
-
import { plural } from "
|
|
5
|
-
import { staleSections } from "
|
|
4
|
+
import { plural } from "#report/plural.ts";
|
|
5
|
+
import { staleSections } from "#report/staleSections.ts";
|
|
6
6
|
|
|
7
7
|
export interface ReportContext {
|
|
8
8
|
readonly baseline: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { StaleBaselineEntry } from "#baseline/compare.ts";
|
|
2
2
|
import type { Outcome } from "#engine/evaluate.ts";
|
|
3
3
|
import type { StaleRegistryEntry } from "#exceptions/registry.ts";
|
|
4
|
-
import { plural } from "
|
|
4
|
+
import { plural } from "#report/plural.ts";
|
|
5
5
|
|
|
6
6
|
interface StaleFiles {
|
|
7
7
|
readonly baseline: string;
|
package/src/rules/builtIn.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { biome } from "#rules/biome.ts";
|
|
1
2
|
import { maxPerFile } from "#rules/comments/maxPerFile.ts";
|
|
2
3
|
import { noBanner } from "#rules/comments/noBanner.ts";
|
|
3
4
|
import { noEnvironmentPragma } from "#rules/comments/noEnvironmentPragma.ts";
|
|
@@ -23,6 +24,16 @@ import { importsManifest } from "#rules/imports/manifest.ts";
|
|
|
23
24
|
import { noTestCode } from "#rules/imports/noTestCode.ts";
|
|
24
25
|
import { importsResolvable } from "#rules/imports/resolvable.ts";
|
|
25
26
|
import { importsRuntime } from "#rules/imports/runtime.ts";
|
|
27
|
+
import { manifestsApplication } from "#rules/manifestsApplication.ts";
|
|
28
|
+
import { manifestsDependencyPins } from "#rules/manifestsDependencyPins.ts";
|
|
29
|
+
import { manifestsExportsShape } from "#rules/manifestsExportsShape.ts";
|
|
30
|
+
import { manifestsNoTestKits } from "#rules/manifestsNoTestKits.ts";
|
|
31
|
+
import { manifestsSorted } from "#rules/manifestsSorted.ts";
|
|
32
|
+
import { manifestsSourceFirst } from "#rules/manifestsSourceFirst.ts";
|
|
33
|
+
import { manifestsValid } from "#rules/manifestsValid.ts";
|
|
34
|
+
import { maxDepth } from "#rules/maxDepth.ts";
|
|
35
|
+
import { maxLines } from "#rules/maxLines.ts";
|
|
36
|
+
import { noBarrel } from "#rules/noBarrel.ts";
|
|
26
37
|
import { jsxConditionals } from "#rules/react/jsxConditionals.ts";
|
|
27
38
|
import { adapterOnlyFakes } from "#rules/stories/adapterOnlyFakes.ts";
|
|
28
39
|
import { authSql } from "#rules/stories/authSql.ts";
|
|
@@ -50,18 +61,7 @@ import { noIgnoreDeprecations } from "#rules/suppressions/noIgnoreDeprecations.t
|
|
|
50
61
|
import { noInline } from "#rules/suppressions/noInline.ts";
|
|
51
62
|
import { testsColocated } from "#rules/test-names/colocated.ts";
|
|
52
63
|
import { testsFollow } from "#rules/test-names/follow.ts";
|
|
53
|
-
import {
|
|
54
|
-
import { manifestsApplication } from "./manifestsApplication.ts";
|
|
55
|
-
import { manifestsDependencyPins } from "./manifestsDependencyPins.ts";
|
|
56
|
-
import { manifestsExportsShape } from "./manifestsExportsShape.ts";
|
|
57
|
-
import { manifestsNoTestKits } from "./manifestsNoTestKits.ts";
|
|
58
|
-
import { manifestsSorted } from "./manifestsSorted.ts";
|
|
59
|
-
import { manifestsSourceFirst } from "./manifestsSourceFirst.ts";
|
|
60
|
-
import { manifestsValid } from "./manifestsValid.ts";
|
|
61
|
-
import { maxDepth } from "./maxDepth.ts";
|
|
62
|
-
import { maxLines } from "./maxLines.ts";
|
|
63
|
-
import { noBarrel } from "./noBarrel.ts";
|
|
64
|
-
import { unusedCode } from "./unusedCode.ts";
|
|
64
|
+
import { unusedCode } from "#rules/unusedCode.ts";
|
|
65
65
|
|
|
66
66
|
export const builtInRules = [
|
|
67
67
|
...effectPolicy,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineRule, type Finding, type Rule } from "#rule.ts";
|
|
2
|
-
import { isDirective, textOf } from "
|
|
3
|
-
import { commentsOf, type SourceComment } from "
|
|
2
|
+
import { isDirective, textOf } from "#rules/comments/kinds.ts";
|
|
3
|
+
import { commentsOf, type SourceComment } from "#rules/comments/scan.ts";
|
|
4
4
|
|
|
5
5
|
interface PatternRule<TId extends string> {
|
|
6
6
|
readonly description: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect, Schema } from "effect";
|
|
2
|
+
import type { SourceComment } from "#rules/comments/scan.ts";
|
|
2
3
|
import { SUPPRESSIONS } from "#rules/suppressions/in.ts";
|
|
3
|
-
import type { SourceComment } from "./scan.ts";
|
|
4
4
|
|
|
5
5
|
export const Pragmas = Schema.Array(Schema.String).pipe(Schema.withDecodingDefaultKey(Effect.succeed<readonly string[]>([])));
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Effect, Schema } from "effect";
|
|
2
2
|
import { plural } from "#report/plural.ts";
|
|
3
3
|
import { defineRule, type Finding, type SourceFile } from "#rule.ts";
|
|
4
|
-
import { isDirective, isPragma, Pragmas } from "
|
|
5
|
-
import { commentsOf, type SourceComment } from "
|
|
4
|
+
import { isDirective, isPragma, Pragmas } from "#rules/comments/kinds.ts";
|
|
5
|
+
import { commentsOf, type SourceComment } from "#rules/comments/scan.ts";
|
|
6
6
|
|
|
7
7
|
const MaxPerFileOptions = Schema.Struct({
|
|
8
8
|
allow: Pragmas,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { defineRule } from "#rule.ts";
|
|
3
|
-
import { isDirective, isJsdoc, isPragma, Pragmas } from "
|
|
4
|
-
import { commentsOf } from "
|
|
3
|
+
import { isDirective, isJsdoc, isPragma, Pragmas } from "#rules/comments/kinds.ts";
|
|
4
|
+
import { commentsOf } from "#rules/comments/scan.ts";
|
|
5
5
|
|
|
6
6
|
const NoJsdocOptions = Schema.Struct({ allow: Pragmas });
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { definePatternRule } from "
|
|
1
|
+
import { definePatternRule } from "#rules/comments/definePattern.ts";
|
|
2
2
|
|
|
3
3
|
const SOURCE_EXTENSION =
|
|
4
4
|
"(?:[cm]?[jt]sx?|json5?|mdx?|css|scss|less|html?|vue|svelte|astro|ya?ml|toml|sql|prisma|graphql|gql|go|rs|py|rb|java|kt|swift|sh)";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { definePatternRule } from "
|
|
1
|
+
import { definePatternRule } from "#rules/comments/definePattern.ts";
|
|
2
2
|
|
|
3
3
|
export const noPrReference = definePatternRule({
|
|
4
4
|
description: "History belongs in version control, not in the code. State the reason itself, so the comment holds without the link.",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { definePatternRule } from "
|
|
1
|
+
import { definePatternRule } from "#rules/comments/definePattern.ts";
|
|
2
2
|
|
|
3
3
|
export const noTodo = definePatternRule({
|
|
4
4
|
description: "A TODO in the code is never done. Do the work now, or track it where the repository tracks work.",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
|
-
import { effectName, type FailureOperation, failureOperations, fileSystemCall } from "
|
|
3
|
-
import { successRecovery } from "
|
|
2
|
+
import { effectName, type FailureOperation, failureOperations, fileSystemCall } from "#rules/effect/failureOperations.ts";
|
|
3
|
+
import { successRecovery } from "#rules/effect/successRecovery.ts";
|
|
4
4
|
|
|
5
5
|
interface FailureFinding {
|
|
6
6
|
readonly message: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
import ts from "typescript";
|
|
3
3
|
import { defineRule, type Finding, type RuleInputs } from "#rule.ts";
|
|
4
|
-
import { failureFindings } from "
|
|
5
|
-
import { effectProgram } from "
|
|
4
|
+
import { failureFindings } from "#rules/effect/failureFindings.ts";
|
|
5
|
+
import { effectProgram } from "#rules/effect/program.ts";
|
|
6
6
|
|
|
7
7
|
function checkFailures(inputs: RuleInputs): readonly Finding[] {
|
|
8
8
|
const program = effectProgram(inputs, false);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
|
+
import { effectName } from "#rules/effect/failureOperations.ts";
|
|
2
3
|
import { returnValues } from "#rules/stories/returnValues.ts";
|
|
3
|
-
import { effectName } from "./failureOperations.ts";
|
|
4
4
|
|
|
5
5
|
function success(checker: ts.TypeChecker, node: ts.Node, seen: Set<ts.Symbol>): boolean {
|
|
6
6
|
if (ts.isParenthesizedExpression(node)) {
|
|
@@ -5,7 +5,7 @@ import { GlobDeclarations, globPatterns, validateGlobs } from "#config/globs.ts"
|
|
|
5
5
|
import { nativeNames } from "#naming/nativeNames.ts";
|
|
6
6
|
import { CAMEL, KEBAB } from "#naming/words.ts";
|
|
7
7
|
import { defineRule, type Finding } from "#rule.ts";
|
|
8
|
-
import { stylesheetImporters } from "
|
|
8
|
+
import { stylesheetImporters } from "#rules/files/stylesheetImporters.ts";
|
|
9
9
|
|
|
10
10
|
const DEFAULT_TOOL_OWNED: readonly string[] = [".*", "package.json", "tsconfig*.json", "biome.json", "biome.jsonc", "*.config.*"];
|
|
11
11
|
|
|
@@ -2,8 +2,8 @@ import { posix } from "node:path";
|
|
|
2
2
|
import { Effect } from "effect";
|
|
3
3
|
import ts from "typescript";
|
|
4
4
|
import type { RuleInputs, SourceFile } from "#rule.ts";
|
|
5
|
+
import { type PackageImports, packageImports } from "#rules/files/packageImports.ts";
|
|
5
6
|
import { parse } from "#rules/parse.ts";
|
|
6
|
-
import { type PackageImports, packageImports } from "./packageImports.ts";
|
|
7
7
|
|
|
8
8
|
const STYLESHEET = /\.s?css$/u;
|
|
9
9
|
|
|
@@ -3,14 +3,14 @@ import { type Departure, departures } from "#imports/departures.ts";
|
|
|
3
3
|
import { defineRule } from "#rule.ts";
|
|
4
4
|
|
|
5
5
|
function messageOf({ installed, specifier, workspace }: Departure): string {
|
|
6
|
-
const
|
|
6
|
+
const relative = `"${specifier}" is a relative import.`;
|
|
7
7
|
if (installed !== undefined) {
|
|
8
|
-
return `${
|
|
8
|
+
return `${relative} It reaches into the installed package ${installed}; import that package by its name.`;
|
|
9
9
|
}
|
|
10
10
|
if (workspace !== undefined) {
|
|
11
|
-
return `${
|
|
11
|
+
return `${relative} It reaches into the workspace package ${workspace}; import it by that name, through a path its package.json "exports" lists.`;
|
|
12
12
|
}
|
|
13
|
-
return `${
|
|
13
|
+
return `${relative} Import it through a "#…" alias from the "imports" of its package.json, and declare one there if none fits.`;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export const importsAliased = defineRule({
|
|
@@ -24,6 +24,6 @@ export const importsAliased = defineRule({
|
|
|
24
24
|
})),
|
|
25
25
|
),
|
|
26
26
|
description:
|
|
27
|
-
"
|
|
27
|
+
"Import own modules through the package.json `imports` aliases, including same-folder modules. Import other packages by their names and exported paths.",
|
|
28
28
|
id: "imports/aliased",
|
|
29
29
|
});
|
|
@@ -9,7 +9,7 @@ import { dependencyNames, type EntryPoint, entryPointsOf, isApplication, provide
|
|
|
9
9
|
import { developmentCode } from "#naming/developmentCode.ts";
|
|
10
10
|
import { testCode } from "#naming/testCode.ts";
|
|
11
11
|
import { defineRule, type RuleInputs } from "#rule.ts";
|
|
12
|
-
import { bundleInputs } from "
|
|
12
|
+
import { bundleInputs } from "#rules/imports/bundleInputs.ts";
|
|
13
13
|
|
|
14
14
|
const QUERY = /\?.*$/u;
|
|
15
15
|
|
|
@@ -7,7 +7,6 @@ import { defineRule, type Finding } from "#rule.ts";
|
|
|
7
7
|
const SECTIONS = ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"] as const;
|
|
8
8
|
const EXACT =
|
|
9
9
|
/^(?:npm:(?:@[^/\s]+\/)?[^@\s]+@)?(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[\dA-Za-z-]+(?:\.[\dA-Za-z-]+)*)?(?:\+[\dA-Za-z-]+(?:\.[\dA-Za-z-]+)*)?$/u;
|
|
10
|
-
const LOCAL = /^(?:workspace:|file:|link:)/u;
|
|
11
10
|
|
|
12
11
|
function dependencyFinding(
|
|
13
12
|
file: string,
|
|
@@ -16,7 +15,7 @@ function dependencyFinding(
|
|
|
16
15
|
version: string,
|
|
17
16
|
catalogs: ReturnType<typeof catalogEntries>,
|
|
18
17
|
): readonly Finding[] {
|
|
19
|
-
if (
|
|
18
|
+
if (version.startsWith("workspace:")) {
|
|
20
19
|
return [];
|
|
21
20
|
}
|
|
22
21
|
const catalog = version.startsWith("catalog:") ? version.slice("catalog:".length) : undefined;
|
|
@@ -29,7 +28,7 @@ function dependencyFinding(
|
|
|
29
28
|
: [
|
|
30
29
|
{
|
|
31
30
|
file,
|
|
32
|
-
message: `${section} entry "${name}: ${version}" must ${catalogs.present || catalog !== undefined ? 'use "catalog:" (or a named catalog) with an entry for this dependency in pnpm-workspace.yaml' : "pin an exact version, including for npm aliases"}.
|
|
31
|
+
message: `${section} entry "${name}: ${version}" must ${catalogs.present || catalog !== undefined ? 'use "catalog:" (or a named catalog) with an entry for this dependency in pnpm-workspace.yaml' : "pin an exact npm version, including for npm aliases"}. Use "workspace:" for workspace dependencies; replace "file:" and "link:" with npm versions or workspace/catalog references.`,
|
|
33
32
|
subject: `${section}.${name}`,
|
|
34
33
|
},
|
|
35
34
|
];
|
package/src/rules/noBarrel.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { posix } from "node:path";
|
|
2
2
|
import { defineRule, type Finding } from "#rule.ts";
|
|
3
|
-
import { parse } from "
|
|
4
|
-
import { secondNames } from "
|
|
3
|
+
import { parse } from "#rules/parse.ts";
|
|
4
|
+
import { secondNames } from "#rules/secondNames.ts";
|
|
5
5
|
|
|
6
6
|
const BARREL_FILE = /^index\.tsx?$/u;
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
2
|
import { defineRule, type Finding } from "#rule.ts";
|
|
3
3
|
import { parse } from "#rules/parse.ts";
|
|
4
|
-
import { jsxChildDecision } from "
|
|
4
|
+
import { jsxChildDecision } from "#rules/react/jsxChildDecision.ts";
|
|
5
5
|
|
|
6
6
|
const REPAIR =
|
|
7
7
|
"Decide before the JSX with an if and early return, or a variable computed above the return; or extract a component that receives the data and returns null when it has nothing to show.";
|
package/src/rules/secondNames.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { storyProgram } from "#adapters/storyProgram.ts";
|
|
|
6
6
|
import { importGraph } from "#imports/graph.ts";
|
|
7
7
|
import { isTestCode } from "#naming/testName.ts";
|
|
8
8
|
import { defineRule, type Finding } from "#rule.ts";
|
|
9
|
-
import { fakeReplacements } from "
|
|
9
|
+
import { fakeReplacements } from "#rules/stories/fakeReplacements.ts";
|
|
10
10
|
|
|
11
11
|
function internal(path: string): boolean {
|
|
12
12
|
return !path.split("/").includes("adapters");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
|
+
import { rejectingTimer } from "#rules/stories/adapters/failureDeadline.ts";
|
|
2
3
|
import type { ImportBinding } from "#rules/stories/importBindings.ts";
|
|
3
4
|
import { memberName, unwrapped } from "#rules/stories/syntax.ts";
|
|
4
|
-
import { rejectingTimer } from "./failureDeadline.ts";
|
|
5
5
|
|
|
6
6
|
const TIMERS = new Set(["setTimeout", "setInterval", "requestAnimationFrame"]);
|
|
7
7
|
const TIMER_MODULES = new Set(["node:timers", "timers", "node:timers/promises", "timers/promises"]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { sqlTokens, tableAt } from "
|
|
1
|
+
import { sqlTokens, tableAt } from "#rules/stories/adapters/sqlTokens.ts";
|
|
2
2
|
|
|
3
3
|
const TABLE_START = new Set(["from", "join", "update", "into", "table", "truncate", "references", "using"]);
|
|
4
4
|
const TABLE_END = new Set(["where", "group", "order", "having", "limit", "returning", "set", "values", "on", ";"]);
|
|
@@ -3,8 +3,8 @@ import { GlobDeclarations, globPatterns, validateGlobs } from "#config/globs.ts"
|
|
|
3
3
|
import { defineRule } from "#rule.ts";
|
|
4
4
|
import { authTables } from "#rules/stories/adapters/authTables.ts";
|
|
5
5
|
import { sqlTables } from "#rules/stories/adapters/sqlTables.ts";
|
|
6
|
-
import { matchesAny } from "
|
|
7
|
-
import { sqlTexts } from "
|
|
6
|
+
import { matchesAny } from "#rules/stories/matchesAny.ts";
|
|
7
|
+
import { sqlTexts } from "#rules/stories/sqlText.ts";
|
|
8
8
|
|
|
9
9
|
const AuthSqlOptions = Schema.Struct({
|
|
10
10
|
owners: GlobDeclarations,
|
|
@@ -3,10 +3,10 @@ import ts from "typescript";
|
|
|
3
3
|
import { importGraph } from "#imports/graph.ts";
|
|
4
4
|
import { defineRule } from "#rule.ts";
|
|
5
5
|
import { internalValue, shapeModule } from "#rules/stories/adapters/outcomeShapes.ts";
|
|
6
|
-
import { importBindings } from "
|
|
7
|
-
import { storyOrigins } from "
|
|
8
|
-
import { storySources } from "
|
|
9
|
-
import { findingAt, memberName, nodesWhere, unwrapped } from "
|
|
6
|
+
import { importBindings } from "#rules/stories/importBindings.ts";
|
|
7
|
+
import { storyOrigins } from "#rules/stories/origins.ts";
|
|
8
|
+
import { storySources } from "#rules/stories/sources.ts";
|
|
9
|
+
import { findingAt, memberName, nodesWhere, unwrapped } from "#rules/stories/syntax.ts";
|
|
10
10
|
|
|
11
11
|
const MESSAGE =
|
|
12
12
|
'Uses an Exit, Cause or Result value or reads an internal outcome tag in a story. Have the kit\'s verb or readout return the outcome in the domain\'s words, such as "unauthorized" or "rolled back", and expect that; build failing inputs in a kit trait.';
|
|
@@ -5,10 +5,10 @@ import { importGraph } from "#imports/graph.ts";
|
|
|
5
5
|
import { packageOf } from "#imports/workspace.ts";
|
|
6
6
|
import { testName } from "#naming/testName.ts";
|
|
7
7
|
import { defineRule } from "#rule.ts";
|
|
8
|
-
import { storyOrigins } from "
|
|
9
|
-
import { storyPrerequisites } from "
|
|
10
|
-
import { nodesWhere, unwrapped } from "
|
|
11
|
-
import { storyUsesInputs } from "
|
|
8
|
+
import { storyOrigins } from "#rules/stories/origins.ts";
|
|
9
|
+
import { storyPrerequisites } from "#rules/stories/prerequisites.ts";
|
|
10
|
+
import { nodesWhere, unwrapped } from "#rules/stories/syntax.ts";
|
|
11
|
+
import { storyUsesInputs } from "#rules/stories/usesInputs.ts";
|
|
12
12
|
|
|
13
13
|
function ignoresEngine(call: ts.CallExpression, checker: ts.TypeChecker): boolean {
|
|
14
14
|
const traits = call.arguments[1];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
2
|
import type { fakeReferences } from "#adapters/imports/fakeReferences.ts";
|
|
3
|
-
import { memberName, unwrapped } from "
|
|
3
|
+
import { memberName, unwrapped } from "#rules/stories/syntax.ts";
|
|
4
4
|
|
|
5
5
|
export function fakeImplementation(expression: ts.Expression, references: ReturnType<typeof fakeReferences>, seen = new Set<ts.Node>()): boolean {
|
|
6
6
|
const node = unwrapped(expression);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
2
|
import { fakeApi, type fakeReferences } from "#adapters/imports/fakeReferences.ts";
|
|
3
|
-
import { fakeImplementation } from "
|
|
4
|
-
import { memberName, unwrapped } from "
|
|
3
|
+
import { fakeImplementation } from "#rules/stories/fakeImplementation.ts";
|
|
4
|
+
import { memberName, unwrapped } from "#rules/stories/syntax.ts";
|
|
5
5
|
|
|
6
6
|
const REPLACEMENTS = new Set([
|
|
7
7
|
"mockImplementation",
|
|
@@ -2,10 +2,10 @@ import { Effect } from "effect";
|
|
|
2
2
|
import ts from "typescript";
|
|
3
3
|
import { importGraph } from "#imports/graph.ts";
|
|
4
4
|
import { defineRule } from "#rule.ts";
|
|
5
|
-
import type { Origin } from "
|
|
6
|
-
import { storyOrigins } from "
|
|
7
|
-
import { retryOption } from "
|
|
8
|
-
import { memberName, nodesWhere } from "
|
|
5
|
+
import type { Origin } from "#rules/stories/collectionOrigins.ts";
|
|
6
|
+
import { storyOrigins } from "#rules/stories/origins.ts";
|
|
7
|
+
import { retryOption } from "#rules/stories/retryOption.ts";
|
|
8
|
+
import { memberName, nodesWhere } from "#rules/stories/syntax.ts";
|
|
9
9
|
|
|
10
10
|
const BUILDERS = new Set(["each", "for", "extend", "runIf", "skipIf", "layer"]);
|
|
11
11
|
const MESSAGE =
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
2
|
import ts from "typescript";
|
|
3
3
|
import { defineRule } from "#rule.ts";
|
|
4
|
-
import { importBindings } from "
|
|
5
|
-
import { storySources } from "
|
|
6
|
-
import { memberName, syntaxFindings, unwrapped } from "
|
|
4
|
+
import { importBindings } from "#rules/stories/importBindings.ts";
|
|
5
|
+
import { storySources } from "#rules/stories/sources.ts";
|
|
6
|
+
import { memberName, syntaxFindings, unwrapped } from "#rules/stories/syntax.ts";
|
|
7
7
|
|
|
8
8
|
const MESSAGE =
|
|
9
9
|
'Checks several outcomes with consecutive expect(yield* …) lines. Let the story\'s words lead: yield* outcomes([["label", () => readout(), expected], …]) from @shivaedev/test-story/server/outcomes.ts, one row per outcome. Keep a plain expect for a single outcome.';
|
|
@@ -4,8 +4,8 @@ import * as HttpStatus from "effect/http/HttpStatus";
|
|
|
4
4
|
import ts from "typescript";
|
|
5
5
|
import { GlobDeclarations, globPatterns, validateGlobs } from "#config/globs.ts";
|
|
6
6
|
import { defineRule } from "#rule.ts";
|
|
7
|
-
import { matchesAny } from "
|
|
8
|
-
import { memberName, nodesWhere, numericValue, syntaxFindings, unwrapped } from "
|
|
7
|
+
import { matchesAny } from "#rules/stories/matchesAny.ts";
|
|
8
|
+
import { memberName, nodesWhere, numericValue, syntaxFindings, unwrapped } from "#rules/stories/syntax.ts";
|
|
9
9
|
|
|
10
10
|
const MESSAGE =
|
|
11
11
|
"Branches on an HTTP error status outside the HTTP edge. Handle the typed domain error here and translate it to an HTTP status in the configured edge module.";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
2
|
import ts from "typescript";
|
|
3
3
|
import { defineRule } from "#rule.ts";
|
|
4
|
-
import { storySources } from "
|
|
5
|
-
import { memberName, nodesWhere, numericValue, syntaxFindings, unwrapped } from "
|
|
4
|
+
import { storySources } from "#rules/stories/sources.ts";
|
|
5
|
+
import { memberName, nodesWhere, numericValue, syntaxFindings, unwrapped } from "#rules/stories/syntax.ts";
|
|
6
6
|
|
|
7
7
|
const MESSAGE =
|
|
8
8
|
'Passes a numeric literal or a matcher-only spec-local numeric const to toBe or toHaveLength. Assert the observed items, write the literal where accepted (zero or a process exitCode), or derive the value from the story\'s inputs. For HTTP statuses, import * as HttpStatus from "effect/http/HttpStatus" and use HttpStatus.fromLiteral("NotFound"), for example.';
|
|
@@ -3,8 +3,8 @@ import ts from "typescript";
|
|
|
3
3
|
import { importGraph } from "#imports/graph.ts";
|
|
4
4
|
import { isTestSupport } from "#naming/testName.ts";
|
|
5
5
|
import { defineRule } from "#rule.ts";
|
|
6
|
-
import { registersTests } from "
|
|
7
|
-
import { memberName, nodesWhere, syntaxFindings, unwrapped } from "
|
|
6
|
+
import { registersTests } from "#rules/stories/registersTests.ts";
|
|
7
|
+
import { memberName, nodesWhere, syntaxFindings, unwrapped } from "#rules/stories/syntax.ts";
|
|
8
8
|
|
|
9
9
|
const MESSAGE =
|
|
10
10
|
"Calls expect in test-support. Return the engine's observed state from the verb and put the expectation in the spec; throw if an action cannot run.";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
2
|
import ts from "typescript";
|
|
3
3
|
import { defineRule } from "#rule.ts";
|
|
4
|
-
import { storySources } from "
|
|
5
|
-
import { memberName, nodesWhere, syntaxFindings, unwrapped } from "
|
|
4
|
+
import { storySources } from "#rules/stories/sources.ts";
|
|
5
|
+
import { memberName, nodesWhere, syntaxFindings, unwrapped } from "#rules/stories/syntax.ts";
|
|
6
6
|
|
|
7
7
|
const MESSAGE =
|
|
8
8
|
"Imports a MAX_* constant from a limits module. Tell a story about the observed behavior instead of asserting a copy of the implementation's cap.";
|
|
@@ -3,10 +3,10 @@ import ts from "typescript";
|
|
|
3
3
|
import { storyProgram } from "#adapters/storyProgram.ts";
|
|
4
4
|
import type { ImportGraph } from "#imports/graph.ts";
|
|
5
5
|
import type { RuleInputs } from "#rule.ts";
|
|
6
|
-
import { iterationOrigin, type Origin } from "
|
|
7
|
-
import { importFrom, importOrigin } from "
|
|
8
|
-
import { returnValues } from "
|
|
9
|
-
import { memberName } from "
|
|
6
|
+
import { iterationOrigin, type Origin } from "#rules/stories/collectionOrigins.ts";
|
|
7
|
+
import { importFrom, importOrigin } from "#rules/stories/importOrigin.ts";
|
|
8
|
+
import { returnValues } from "#rules/stories/returnValues.ts";
|
|
9
|
+
import { memberName } from "#rules/stories/syntax.ts";
|
|
10
10
|
|
|
11
11
|
export function storyOrigins(inputs: RuleInputs, graph: ImportGraph) {
|
|
12
12
|
const program = storyProgram(inputs, graph);
|
|
@@ -2,8 +2,8 @@ import { Effect } from "effect";
|
|
|
2
2
|
import { positiveRefusalFindings } from "#adapters/positiveRefusalFindings.ts";
|
|
3
3
|
import { importGraph } from "#imports/graph.ts";
|
|
4
4
|
import { defineRule } from "#rule.ts";
|
|
5
|
-
import { storyOrigins } from "
|
|
6
|
-
import { storySources } from "
|
|
5
|
+
import { storyOrigins } from "#rules/stories/origins.ts";
|
|
6
|
+
import { storySources } from "#rules/stories/sources.ts";
|
|
7
7
|
|
|
8
8
|
export const positiveRefusals = defineRule({
|
|
9
9
|
check: Effect.fn("Stories.check")(function* (inputs) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
|
-
import { memberName, unwrapped } from "
|
|
2
|
+
import { memberName, unwrapped } from "#rules/stories/syntax.ts";
|
|
3
3
|
|
|
4
4
|
function vitestBindings(source: ts.SourceFile): ReadonlyMap<string, string> {
|
|
5
5
|
const names = new Map<string, string>();
|
|
@@ -2,7 +2,7 @@ import ts from "typescript";
|
|
|
2
2
|
import { isTestSupport, testName } from "#naming/testName.ts";
|
|
3
3
|
import { defineRule, type Finding, type SourceFile } from "#rule.ts";
|
|
4
4
|
import { parse } from "#rules/parse.ts";
|
|
5
|
-
import { fixtureWrites } from "
|
|
5
|
+
import { fixtureWrites } from "#rules/stories/fixtureWrites.ts";
|
|
6
6
|
|
|
7
7
|
const SETUP_HELPER = /^(?:seed|make|build|setup)(?![a-z])/u;
|
|
8
8
|
const STORY_KIT =
|
|
@@ -5,8 +5,8 @@ import { importGraph } from "#imports/graph.ts";
|
|
|
5
5
|
import { packageOf } from "#imports/workspace.ts";
|
|
6
6
|
import { isTestSupport, testName } from "#naming/testName.ts";
|
|
7
7
|
import type { RuleInputs } from "#rule.ts";
|
|
8
|
-
import { storyOrigins } from "
|
|
9
|
-
import { storyPrerequisites } from "
|
|
8
|
+
import { storyOrigins } from "#rules/stories/origins.ts";
|
|
9
|
+
import { storyPrerequisites } from "#rules/stories/prerequisites.ts";
|
|
10
10
|
|
|
11
11
|
export const storySources = Effect.fn("Stories.storySources")(function* (inputs: RuleInputs) {
|
|
12
12
|
const graph = yield* importGraph(inputs);
|