@clipboard-health/oxlint-config 5.3.0 → 5.4.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/README.md +9 -9
- package/package.json +2 -2
- package/src/internal/presets.d.ts +1 -1
- package/src/internal/presets.js +1 -1
package/README.md
CHANGED
|
@@ -270,7 +270,7 @@ suppression needs a specific `-- <reason>`, and the rules in `NEVER_SUPPRESS_RUL
|
|
|
270
270
|
See the [plugin README](../oxlint-plugin/README.md#suppression-policy) for the full policy. It is
|
|
271
271
|
opt in; no other preset enables it.
|
|
272
272
|
|
|
273
|
-
Until a repository's existing directives comply, run `
|
|
273
|
+
Until a repository's existing directives comply, run `cb-check-suppressions` from
|
|
274
274
|
`@clipboard-health/oxlint-plugin` in CI. It holds directives added or changed since the merge base to
|
|
275
275
|
the policy and needs no baseline. Once the backlog is zero, add the preset:
|
|
276
276
|
|
|
@@ -300,7 +300,7 @@ policy.
|
|
|
300
300
|
`lint-ceilings.json` holds per-file upper bounds for count rules such as `max-lines` and
|
|
301
301
|
`complexity`, so a repository can keep strict defaults while existing large or complex files stay
|
|
302
302
|
as they are. A listed file may shrink but not grow. Pull requests don't edit the file: the
|
|
303
|
-
`
|
|
303
|
+
`cb-lint-ceilings check` CLI blocks growth, and a weekly bot PR lowers stale values. This avoids
|
|
304
304
|
the merge conflicts of exact-count baselines.
|
|
305
305
|
|
|
306
306
|
```json
|
|
@@ -352,18 +352,18 @@ assumes `oxlint.config.ts` and `lint-ceilings.json` both sit in the repository r
|
|
|
352
352
|
|
|
353
353
|
### Commands
|
|
354
354
|
|
|
355
|
-
`
|
|
355
|
+
`cb-lint-ceilings` ships in `@clipboard-health/oxlint-plugin`, a dependency of this package. It
|
|
356
356
|
measures with the repository's own Oxlint and configuration, with ceilings ignored, so its numbers
|
|
357
357
|
match the linter's. It reads the root configuration through `oxlint --print-config`, which drops
|
|
358
358
|
rule options inherited through `extends` (Oxlint 1.91). Build the root `oxlint.config.ts` with
|
|
359
359
|
`createOxlintConfig`, not `extends`, so options such as `max` survive.
|
|
360
360
|
|
|
361
361
|
```sh
|
|
362
|
-
npx
|
|
363
|
-
npx
|
|
364
|
-
npx
|
|
365
|
-
npx
|
|
366
|
-
npx
|
|
362
|
+
npx cb-lint-ceilings init # one entry per file above its default, all supported rules
|
|
363
|
+
npx cb-lint-ceilings init --rule complexity
|
|
364
|
+
npx cb-lint-ceilings check # in CI; locally compares with the merge base of origin/HEAD
|
|
365
|
+
npx cb-lint-ceilings check --base origin/main
|
|
366
|
+
npx cb-lint-ceilings tighten # weekly, on the default branch
|
|
367
367
|
```
|
|
368
368
|
|
|
369
369
|
`check` looks at changed files that have a ceiling and lints their base and current versions. It
|
|
@@ -398,7 +398,7 @@ lint-ceilings:
|
|
|
398
398
|
fetch-depth: 2
|
|
399
399
|
persist-credentials: false
|
|
400
400
|
# Install the repository's dependencies, then:
|
|
401
|
-
- run: npx
|
|
401
|
+
- run: npx cb-lint-ceilings check
|
|
402
402
|
```
|
|
403
403
|
|
|
404
404
|
There is no shared approval workflow yet. A repository that wants a reviewed path for raises can
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/oxlint-config",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"description": "Shared Oxlint configuration for Clipboard Health repositories.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"config",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@clipboard-health/oxlint-plugin": "1.
|
|
23
|
+
"@clipboard-health/oxlint-plugin": "1.11.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"oxlint": ">=1.68.0",
|
|
@@ -14,7 +14,7 @@ export declare const strict: OxlintPreset;
|
|
|
14
14
|
/**
|
|
15
15
|
* Requires a specific reason on every lint suppression and forbids suppressing the rules in
|
|
16
16
|
* `NEVER_SUPPRESS_RULES`. Opt in per repository once existing directives comply; until then, run
|
|
17
|
-
* `
|
|
17
|
+
* `cb-check-suppressions` in CI to hold new and changed directives to the policy.
|
|
18
18
|
*/
|
|
19
19
|
export declare const suppressionPolicy: OxlintPreset;
|
|
20
20
|
/** Type-aware companion to `strict`; compose it with `typeAware`. */
|
package/src/internal/presets.js
CHANGED
|
@@ -516,7 +516,7 @@ exports.strict = {
|
|
|
516
516
|
/**
|
|
517
517
|
* Requires a specific reason on every lint suppression and forbids suppressing the rules in
|
|
518
518
|
* `NEVER_SUPPRESS_RULES`. Opt in per repository once existing directives comply; until then, run
|
|
519
|
-
* `
|
|
519
|
+
* `cb-check-suppressions` in CI to hold new and changed directives to the policy.
|
|
520
520
|
*/
|
|
521
521
|
exports.suppressionPolicy = {
|
|
522
522
|
jsPlugins: [
|