Repository navigation
Releases: systemfsoftware/gritlint
Release list
@systemfsoftware/gritlint@v0.2.0
@systemfsoftware/gritlint@0.2.0
cell-architecture/service-exports-no-layer now reports a *.service.ts module that imports a driver (node:*, a Node built-in, @effect/platform-*, @effect/sql-*, @effect/ai-*, or a reviewed database client or vendor SDK) through a static import, a re-export, import() or import x = require(...), and an import that renames a *Layer or *Live binding. A pure static readonly layer (layerTest, layerConfig) on the Service class now passes. Bumping gritlint can add findings for driver imports and remove findings for pure static layers; the nextAction says to move the driver import and its Layers into a module beside the service that only composition roots and tests import. Each reported violation now points at the offending node, every bundled rule names a reason code and a next action, and --format json is a versioned document. New formats: concise, github and github-summary. To upgrade:
- Open each of your rule files with a
---block declaringreasonCode(kebab-case) andnextAction;locateis optional and no other key is allowed, so drop anytitle:line. Otherwise the run exits 2. - Read JSON as
{ "schemaVersion": 1, ... }:ruleis nowruleId,pathandlinemove intolocation(path, plus an optionalrange), andfiles_selectedis nowfilesSelected.gritlint schema --reportprints the schema. - In every bad fixture case, commit
expected-locations.txt: one line per reported violation,<ruleId> <path>[:<line>:<column>-<line>:<column>]. gritlint now ships as an npm-style tarball that the flake builds as itsgritlint-tarballoutput. A project installs it from the tarball file, with no registry and no network. The tarball carries static binaries for linux-x64 and linux-arm64 and a node launcher that runs the one for the host. On any other platform,gritlintexits 2 and names the two platforms it supports. When gritlint refuses a pack parameter name in its config, the error now gives the reason: the name is empty, or the name is not a GritQL identifier. Before this, every refused name, an empty one included, was reported as not being a GritQL identifier. Bundled rules report configs they used to miss, and stop false reports:
- Every bundled rule can check files at the repository root, so a single-package repository is no longer skipped. For
presetFilesandsharedVitestConfigFile, start the value with(?:.*/)?, as the pack README shows, to include root files. source-resolution/vitest-conditionsrequires the source condition in bothresolve.conditionsandssr.resolve.conditions, as its next action said.source-resolution/tsconfig-pathsreports apathskey under the package's own name (@acme/app/*), not only the bare name.vitest-conditions,tsconfig-conditionandtsconfig-preset-module-modeaccept the source condition anywhere in a list (such as after...defaultClientConditions), and the last accepts module modes in any letter case.
Upgrading can surface new reports; fix each as its next action says. gritlint now parses a TypeScript object type or interface whose next member, on a new line, is a generic call signature (the shape Effect's dual overloads take), so such a module is judged instead of refusing the run. A target the engine cannot scan still refuses the run with exit 2, and stderr now carries one uncolored line with a reason code and a next action, the same in every format:
ERROR gritlint: <file>:<line>:<column>: target-does-not-parse: ...when the file does not parse;ERROR gritlint: <file>: target-too-large: ...when the file is over the engine's 1,000,000-byte limit (before this, it was reported as a syntax error at 1:1);ERROR gritlint: <file>: target-not-scanned: ...for any other engine log on the file.
Stderr is colored only when it is a terminal. A consumer that matched the old target file ... does not parse message matches the reason code instead.
@systemfsoftware/gritlint@v0.1.0
@systemfsoftware/gritlint@0.1.0
The first release from systemfsoftware/gritlint. gritlint runs GritQL rule packs over a repository's config files. It ships as this repository's Nix flake, packages.<system>.gritlint, sandboxed by bubblewrap, and as an npm-style tarball, gritlint-tarball, holding static binaries for linux-x64 and linux-arm64 and a node launcher. It was imported from the systemfsoftware monorepo at df908ddfe497e53c1c03b92519a96c913c441a58.