@shivaedev/quality 0.18.0 → 0.19.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 +43 -0
- package/README.md +143 -536
- package/biome/declarations.json +0 -45
- package/biome/plugins/constant-names.grit +1 -1
- package/biome/plugins/effect-fn-functions.grit +1 -1
- package/biome/preset.json +16 -9
- package/dist/biome/nativeEffectCall.d.ts +4 -0
- package/dist/biome/nativeEffectCall.d.ts.map +1 -0
- package/dist/biome/nativeEffectCall.js +34 -0
- package/dist/biome/nativeEffectCall.js.map +1 -0
- package/dist/biome/recognizeDiagnostics.d.ts +3 -0
- package/dist/biome/recognizeDiagnostics.d.ts.map +1 -0
- package/dist/biome/recognizeDiagnostics.js +58 -0
- package/dist/biome/recognizeDiagnostics.js.map +1 -0
- package/dist/biome/report.d.ts +10 -0
- package/dist/biome/report.d.ts.map +1 -1
- package/dist/biome/report.js +23 -5
- package/dist/biome/report.js.map +1 -1
- package/dist/biome/syntax.d.ts +12 -0
- package/dist/biome/syntax.d.ts.map +1 -0
- package/dist/biome/syntax.js +29 -0
- package/dist/biome/syntax.js.map +1 -0
- package/dist/cli/args.d.ts +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/baseline.d.ts +1 -1
- package/dist/cli/baseline.d.ts.map +1 -1
- package/dist/cli/baseline.js.map +1 -1
- package/dist/cli/fix.d.ts +6 -6
- 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/run-main.d.ts +1 -1
- package/dist/cli/run-main.d.ts.map +1 -1
- package/dist/cli/run-main.js.map +1 -1
- package/dist/config/decode.d.ts +3 -7
- package/dist/config/decode.d.ts.map +1 -1
- package/dist/config/decode.js +5 -3
- package/dist/config/decode.js.map +1 -1
- package/dist/config/load.d.ts +0 -2
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +11 -7
- package/dist/config/load.js.map +1 -1
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +8 -12
- package/dist/config/resolve.js.map +1 -1
- package/dist/config.d.ts +10 -16
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/decoded.d.ts +4 -4
- package/dist/decoded.d.ts.map +1 -1
- package/dist/decoded.js.map +1 -1
- package/dist/engine/session.js.map +1 -1
- package/dist/engine/violation.d.ts +1 -1
- package/dist/engine/violation.d.ts.map +1 -1
- package/dist/engine/violation.js.map +1 -1
- package/dist/hooks/preCommit.d.ts +2 -2
- package/dist/hooks/preCommit.d.ts.map +1 -1
- package/dist/hooks/preCommit.js +24 -34
- package/dist/hooks/preCommit.js.map +1 -1
- package/dist/imports/browserGlobals.d.ts +3 -0
- package/dist/imports/browserGlobals.d.ts.map +1 -0
- package/dist/imports/browserGlobals.js +125 -0
- package/dist/imports/browserGlobals.js.map +1 -0
- package/dist/imports/browserNames.d.ts +2 -0
- package/dist/imports/browserNames.d.ts.map +1 -0
- package/dist/imports/browserNames.js +78 -0
- package/dist/imports/browserNames.js.map +1 -0
- package/dist/imports/fences/check.d.ts +4 -0
- package/dist/imports/fences/check.d.ts.map +1 -0
- package/dist/imports/fences/check.js +10 -0
- package/dist/imports/fences/check.js.map +1 -0
- package/dist/imports/fences/declarations.d.ts +5 -0
- package/dist/imports/fences/declarations.d.ts.map +1 -0
- package/dist/imports/fences/declarations.js +29 -0
- package/dist/imports/fences/declarations.js.map +1 -0
- package/dist/imports/fences/discover.d.ts +5 -0
- package/dist/imports/fences/discover.d.ts.map +1 -0
- package/dist/imports/fences/discover.js +41 -0
- package/dist/imports/fences/discover.js.map +1 -0
- package/dist/imports/graph.js +2 -2
- package/dist/imports/graph.js.map +1 -1
- package/dist/imports/projects.js.map +1 -1
- package/dist/imports/runtime.d.ts +5 -0
- package/dist/imports/runtime.d.ts.map +1 -0
- package/dist/imports/runtime.js +32 -0
- package/dist/imports/runtime.js.map +1 -0
- package/dist/imports/workspace.d.ts +1 -1
- package/dist/imports/workspace.d.ts.map +1 -1
- package/dist/imports/workspace.js +5 -1
- package/dist/imports/workspace.js.map +1 -1
- package/dist/inventory/collect.d.ts.map +1 -1
- package/dist/inventory/collect.js +8 -1
- package/dist/inventory/collect.js.map +1 -1
- package/dist/inventory/trackedPaths.d.ts +3 -0
- package/dist/inventory/trackedPaths.d.ts.map +1 -0
- package/dist/inventory/trackedPaths.js +26 -0
- package/dist/inventory/trackedPaths.js.map +1 -0
- package/dist/inventory/walk.d.ts +4 -4
- package/dist/inventory/walk.d.ts.map +1 -1
- package/dist/inventory/walk.js +32 -12
- package/dist/inventory/walk.js.map +1 -1
- package/dist/rules/built-in.d.ts +2 -3
- package/dist/rules/built-in.d.ts.map +1 -1
- package/dist/rules/built-in.js +6 -0
- package/dist/rules/built-in.js.map +1 -1
- package/dist/rules/comments/max-per-file.js +1 -1
- package/dist/rules/comments/max-per-file.js.map +1 -1
- package/dist/rules/files/folderNames.js +1 -1
- package/dist/rules/files/folderNames.js.map +1 -1
- package/dist/rules/files/otherNames.d.ts.map +1 -1
- package/dist/rules/files/otherNames.js +1 -10
- package/dist/rules/files/otherNames.js.map +1 -1
- package/dist/rules/imports/bundleInputs.d.ts +7 -0
- package/dist/rules/imports/bundleInputs.d.ts.map +1 -0
- package/dist/rules/imports/bundleInputs.js +77 -0
- package/dist/rules/imports/bundleInputs.js.map +1 -0
- package/dist/rules/imports/fences.d.ts +1 -2
- package/dist/rules/imports/fences.d.ts.map +1 -1
- package/dist/rules/imports/fences.js +4 -14
- package/dist/rules/imports/fences.js.map +1 -1
- package/dist/rules/imports/manifest.d.ts +2 -0
- package/dist/rules/imports/manifest.d.ts.map +1 -0
- package/dist/rules/imports/manifest.js +98 -0
- package/dist/rules/imports/manifest.js.map +1 -0
- package/dist/rules/imports/noTestCode.d.ts +2 -0
- package/dist/rules/imports/noTestCode.d.ts.map +1 -0
- package/dist/rules/imports/noTestCode.js +17 -0
- package/dist/rules/imports/noTestCode.js.map +1 -0
- package/dist/rules/imports/runtime.d.ts +2 -0
- package/dist/rules/imports/runtime.d.ts.map +1 -0
- package/dist/rules/imports/runtime.js +41 -0
- package/dist/rules/imports/runtime.js.map +1 -0
- package/dist/rules/max-lines.d.ts +0 -1
- package/dist/rules/max-lines.d.ts.map +1 -1
- package/dist/rules/max-lines.js +3 -10
- package/dist/rules/max-lines.js.map +1 -1
- package/dist/rules/suppressions/biome-overrides.d.ts.map +1 -1
- package/dist/rules/suppressions/biome-overrides.js +21 -4
- package/dist/rules/suppressions/biome-overrides.js.map +1 -1
- package/dist/rules/suppressions/biomeRecommended.js +2 -2
- package/dist/rules/suppressions/biomeRecommended.js.map +1 -1
- package/dist/rules/suppressions/no-inline.js +1 -1
- package/dist/rules/suppressions/no-inline.js.map +1 -1
- package/dist/standard-schema.d.ts +1 -1
- package/dist/standard-schema.d.ts.map +1 -1
- package/dist/standard-schema.js +10 -2
- package/dist/standard-schema.js.map +1 -1
- package/dist/vitest.d.ts +1 -3
- package/dist/vitest.d.ts.map +1 -1
- package/dist/vitest.js +11 -6
- package/dist/vitest.js.map +1 -1
- package/docs/debt-and-hooks.md +90 -0
- package/docs/modules.md +253 -0
- package/docs/naming.md +126 -0
- package/docs/north-star.md +61 -0
- package/docs/roadmap.md +37 -0
- package/docs/rules.md +308 -0
- package/docs/tooling.md +120 -0
- package/package.json +7 -5
- package/src/biome/nativeEffectCall.ts +45 -0
- package/src/biome/recognizeDiagnostics.ts +67 -0
- package/src/biome/report.ts +24 -6
- package/src/biome/syntax.ts +36 -0
- package/src/cli/args.ts +2 -2
- package/src/cli/baseline.ts +3 -3
- package/src/cli/fix.ts +13 -13
- package/src/cli/run-main.ts +1 -1
- package/src/config/decode.ts +7 -3
- package/src/config/load.ts +15 -9
- package/src/config/resolve.ts +10 -15
- package/src/config.ts +8 -15
- package/src/decoded.ts +3 -3
- package/src/engine/session.ts +3 -3
- package/src/engine/violation.ts +2 -2
- package/src/hooks/preCommit.ts +30 -39
- package/src/imports/browserGlobals.ts +142 -0
- package/src/imports/browserNames.ts +80 -0
- package/src/imports/fences/check.ts +12 -0
- package/src/imports/fences/declarations.ts +38 -0
- package/src/imports/fences/discover.ts +37 -0
- package/src/imports/graph.ts +2 -2
- package/src/imports/projects.ts +2 -2
- package/src/imports/runtime.ts +37 -0
- package/src/imports/workspace.ts +7 -2
- package/src/inventory/collect.ts +8 -1
- package/src/inventory/trackedPaths.ts +28 -0
- package/src/inventory/walk.ts +65 -36
- package/src/rules/built-in.ts +6 -0
- package/src/rules/comments/max-per-file.ts +1 -1
- package/src/rules/files/folderNames.ts +1 -1
- package/src/rules/files/otherNames.ts +1 -10
- package/src/rules/imports/bundleInputs.ts +94 -0
- package/src/rules/imports/fences.ts +4 -16
- package/src/rules/imports/manifest.ts +116 -0
- package/src/rules/imports/noTestCode.ts +18 -0
- package/src/rules/imports/runtime.ts +43 -0
- package/src/rules/max-lines.ts +4 -10
- package/src/rules/suppressions/biome-overrides.ts +31 -4
- package/src/rules/suppressions/biomeRecommended.ts +2 -2
- package/src/rules/suppressions/no-inline.ts +1 -1
- package/src/standard-schema.ts +11 -3
- package/src/vitest.ts +11 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.19.0 - 2026-10-12
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `imports/runtime` infers browser code in `src/client/`, server code in `src/server/` and shared code elsewhere, for packages with either runtime folder. It rejects runtime-crossing imports and shared browser globals or Node built-ins while existing explicit fences remain active.
|
|
8
|
+
- Shared browser-global checks include runtime destructuring defaults, reads from `globalThis` in variable bindings, parameter defaults and assignments, and class superclass expressions, while leaving locally bound names, type annotations, implements clauses and interface heritage outside the global value scan.
|
|
9
|
+
- `importsManifest` in `rules/imports/manifest.ts` is a `Rule<"imports/manifest", undefined>` enabled by default. It checks workspace imports against the importing package's `dependencies`, `peerDependencies` and `optionalDependencies` without configuration or a package scope convention. Tests, `test-support`, package-root `script`, `scripts` and `tooling` folders and package-root config files may also use `devDependencies`. The rule checks type imports and unresolved workspace package names as well as resolved aliases and relative paths.
|
|
10
|
+
- Workspace package discovery reads repository manifests independently of `sources`, so selecting only source folders preserves each member's dependency policy and checks imports of unselected workspace members. `workspacePackages` in `imports/workspace.ts` accepts an optional `root` alongside `files` and `readText` for repository discovery; readers without a root retain their supplied manifest inventory.
|
|
11
|
+
- Discover `quality.fences.config.ts` beside the repository root and each workspace package manifest, combining its default array of import fences with existing config-supplied fences in the shared quality report. Invalid boundary files stop the gate.
|
|
12
|
+
- Reject production imports of test files and anything under `test-support/` with the default `imports/no-test-code` rule, exported as `noTestCode` from `rules/imports/noTestCode.ts`. Shared code belongs in a production module that tests can import; the rule also checks type imports, re-exports and test assets and takes no registry exceptions.
|
|
13
|
+
- Export `trackedPaths(directory)` and `ignoredTrackedPaths(directory)` from `inventory/trackedPaths.ts`, returning promises of absolute tracked paths and tracked paths matching Git ignore rules.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- The Biome preset reports `useConsistentArrayType` and `useConsistentCurlyBraces` at error again. Their automatic fixes stay off: array shorthand can change locally defined types, and removing JSX string braces can change rendered text.
|
|
18
|
+
- Run Biome 2.5.15. It reports `useArraySortCompare`, `noBaseToString` and GritQL formatting findings that 2.5.14 missed, so an upgrading repository can see new findings. It no longer flags a regular expression's `.test(value)` call under `useValidTestTitle`, so the report bridge stops correcting that case itself.
|
|
19
|
+
- Enable Biome's `noSelfImport`, `noReactObjectTypeAsDefaultProp`, `noMisplacedListElements` and `usePromiseRejectErrors` rules in the shared preset. A repository now fails the gate on a module that imports itself, a React component whose prop default is an array, object or function literal, an `<li>` outside `<ul>`, `<ol>` or `<menu>`, and a promise rejected with something other than an `Error`.
|
|
20
|
+
- The manifest dependency rule allows development dependencies in source modules explicitly blocked by package exports when runtime code cannot reach them in the scanned import graph. Public modules, transitive imports, re-exports, type references and executable entry points retain the runtime dependency boundary, including executables under tooling folders.
|
|
21
|
+
- Quality uses its built-in defaults when `quality.config.ts` is absent. Existing configs still load and validate; a broken config or missing explicit `--config` path fails.
|
|
22
|
+
- The explicitly installed pre-commit hook runs lint, then the manifest's `typecheck` and `quality:commit` scripts when present. It uses the declared npm, pnpm, yarn or bun package manager, defaulting to npm.
|
|
23
|
+
- Recognize regex-literal tests, generator harness parameters and native Effect failure tag handlers in the shared Biome report bridge. Keep invalid test titles, done callbacks and nested component factories reportable.
|
|
24
|
+
- Prefix generic binders in CLI baseline and fix helpers, CLI execution, config, decoding, engine session and violation helpers, and import project memoization with `T`, preserving their types and runtime behavior.
|
|
25
|
+
- Align the package's agent guidance, README, north star, roadmap and topic references around one opinionated policy with minimal repository setup. Keep the accepted warning, off and consumer Biome-override APIs visible as implementation gaps rather than recommended adoption choices.
|
|
26
|
+
- Explain the repository gate through a human introduction, an agent mental model and complete config, local-rule and boundary examples. Add package guidance, a north star and a roadmap, and move the detailed rule, naming, debt and shared-tooling references under `docs/`.
|
|
27
|
+
- Publish `docs/` alongside the README; keep agent instructions outside the package tarball.
|
|
28
|
+
- The Biome preset now reports a bare `process` global (`noProcessGlobal`) and a JSON import without `with { type: "json" }` (`useJsonImportAttributes`) as errors. Their automatic fixes stay disabled because Biome's own fixes hang or emit invalid syntax: `quality lint` reports them and the author repairs them by hand.
|
|
29
|
+
- Report misused promises, missing explicit switch cases and loose null equality as errors in the shared Biome preset. Leave their fixes disabled so authors retain promise ownership, fallback behavior and checks for both null and undefined.
|
|
30
|
+
- The Biome preset reports unsorted Tailwind classes at error and enables the `useSortedClasses` fix for class attributes and calls to `cn`, `clsx` and `cva`.
|
|
31
|
+
- `testProjects` gives each test 30 seconds instead of Vitest's 5-second default, so tests that start servers, browsers or CLIs no longer time out on a busy CI runner.
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- Runtime code in another workspace member also removes the development-dependency exemption from export-blocked bundle inputs it reaches. Cross-member imports from test code retain the exemption.
|
|
36
|
+
- Reject empty import graphs even when no fences are configured, keeping source selection errors visible.
|
|
37
|
+
- Report unconditional skipped tests as Biome errors again, with automatic unskipping disabled. Document the PostgreSQL URL gate as the only permitted skip convention; a skipped test proves nothing.
|
|
38
|
+
- Keep tracked files checked even when Git ignore patterns match them, including Biome checks. A folder named `generated/` no longer exempts authored files from folder and asset naming checks; ignored, untracked output stays outside discovery.
|
|
39
|
+
- Name code repairs in suppression, recommended-rule, empty-import-graph and conflicting-fix guidance instead of suggesting disabled rules or new weakening declarations.
|
|
40
|
+
|
|
41
|
+
### Breaking
|
|
42
|
+
|
|
43
|
+
- Removed `QualityConfig.preCommit` and the `PreCommit` type. Put extra repository checks in `package.json` as `quality:commit`; type checking is discovered from `typecheck`. Lower staged debt explicitly with `quality baseline tighten --staged`; the hook no longer changes or stages the baseline.
|
|
44
|
+
- Config rejects `warn` and `off` rule levels, raised line/comment limits, `exclude`, and `structure/max-lines.testFiles`; `testProjects()` rejects suite-exclusion options. Remove these settings, keep the shared limits (or lower them), and record existing findings with `quality baseline write --rule <id>`. Keep only reasoned Biome exceptions for individual rules on explicit files or named directory exclusions; whole-check, group, file-glob and blanket declarations are rejected.
|
|
45
|
+
|
|
3
46
|
## 0.18.0 - 2026-10-06
|
|
4
47
|
|
|
5
48
|
### Added
|