kvalita 1.24.1 → 1.24.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/README.md
CHANGED
|
@@ -45,7 +45,7 @@ The rest apply to all code:
|
|
|
45
45
|
- `as unknown as`, which skips the type check entirely.
|
|
46
46
|
- An object literal cast with `as Type`, where an annotation checks every field. `as const` is fine.
|
|
47
47
|
- `.catch()` chained on a promise, where try/catch around an `await` is the house style. A fire-and-forget call behind `void` keeps its `.catch()`.
|
|
48
|
-
- Two or more `===` comparisons
|
|
48
|
+
- Two or more `===` comparisons of one variable against literals, which read better as a named array and `.includes()`. A property such as `parsed.kind` is left alone, since a chain on it can narrow a union that `.includes()` cannot.
|
|
49
49
|
- A regex constant whose name doesn't end with `Regex`.
|
|
50
50
|
|
|
51
51
|
The plugins load from `node_modules/kvalita`, so the config expects kvalita installed at the project root.
|
|
@@ -131,7 +131,7 @@ jobs:
|
|
|
131
131
|
secrets: inherit
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
`shared-release` takes `branch`, `build`, `config` and `bun-version`; `shared-test` takes `bun-version` and `ref`. Every one has a default, so a repo on the common setup passes nothing. Start
|
|
134
|
+
`shared-release` takes `branch`, `build`, `config` and `bun-version`; `shared-test` takes `bun-version` and `ref`. Every one has a default, so a repo on the common setup passes nothing. Start the release from the branch it releases, and pass that branch as `branch`. npm's provenance names the branch the run started on, so a run started on `main` can't publish another branch. Pass the same branch as `ref` to any gate job, such as `shared-test`, so the gates check the code being released.
|
|
135
135
|
|
|
136
136
|
`shared-package` checks the package the way a consumer gets it. It builds the package, installs it into an empty project with `npm install --install-links`, so only the published files land there, and loads every entry point in `exports`: through `import`, and through `require()` where a `require` condition exists. It does that on every even Node.js major from the floor in `engines.node`, or 18 when it isn't set, up to the latest release. On the latest one, it also turns off syntax detection and `require()` of ESM files, which older versions don't have. Optional peers get installed too, since an entry point built on one needs it.
|
|
137
137
|
|
package/package.json
CHANGED