@redocly/recheck 0.9.0 → 0.11.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 +174 -94
- package/dist/cli.js +110 -99
- package/dist/cli.js.map +1 -1
- package/dist/commands/baseline.d.ts +1 -1
- package/dist/commands/baseline.js +1 -1
- package/dist/commands/markdoc-schema.js +6 -6
- package/dist/commands/markdoc-schema.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +1 -1
- package/dist/commands/run.js.map +1 -1
- package/dist/core/baseline.js +0 -0
- package/dist/core/baseline.js.map +1 -1
- package/dist/data/realm-front-matter-schema.d.ts +28 -0
- package/dist/data/realm-front-matter-schema.d.ts.map +1 -0
- package/dist/data/realm-front-matter-schema.js +73 -0
- package/dist/data/realm-front-matter-schema.js.map +1 -0
- package/dist/parser/markdoc/extract-statics.d.ts +1 -1
- package/dist/parser/markdoc/extract-statics.js +2 -2
- package/dist/parser/markdoc/extract-statics.js.map +1 -1
- package/dist/rules/scope/length.d.ts.map +1 -1
- package/dist/rules/scope/length.js +5 -1
- package/dist/rules/scope/length.js.map +1 -1
- package/dist/rules/scope/metric.js +1 -1
- package/dist/rules/scope/metric.js.map +1 -1
- package/dist/rules/token/front-matter.d.ts.map +1 -1
- package/dist/rules/token/front-matter.js +40 -3
- package/dist/rules/token/front-matter.js.map +1 -1
- package/dist/scopes/extractor.d.ts.map +1 -1
- package/dist/scopes/extractor.js +89 -28
- package/dist/scopes/extractor.js.map +1 -1
- package/dist/scopes/sentences.d.ts.map +1 -1
- package/dist/scopes/sentences.js +85 -26
- package/dist/scopes/sentences.js.map +1 -1
- package/package.json +12 -3
- package/skills/recheck-config/SKILL.md +4 -4
- package/skills/recheck-lint/SKILL.md +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/recheck",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Content linting (configurable + built-in rules)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -59,13 +59,22 @@
|
|
|
59
59
|
"typescript": "6.0.3",
|
|
60
60
|
"vitest": "4.1.10",
|
|
61
61
|
"@redocly/portal": "0.68.3",
|
|
62
|
-
"@redocly/theme": "0.69.0-next.
|
|
62
|
+
"@redocly/theme": "0.69.0-next.5"
|
|
63
|
+
},
|
|
64
|
+
"nx": {
|
|
65
|
+
"targets": {
|
|
66
|
+
"vitest:test": {
|
|
67
|
+
"dependsOn": [
|
|
68
|
+
"build"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
63
72
|
},
|
|
64
73
|
"scripts": {
|
|
65
74
|
"build": "tsgo && tsgo --noEmit -p tsconfig.typecheck.json",
|
|
66
75
|
"dev": "tsgo --watch",
|
|
67
76
|
"start": "node dist/cli.js",
|
|
68
|
-
"validate": "node dist/cli.js validate",
|
|
77
|
+
"validate": "node dist/cli.js --validate-config",
|
|
69
78
|
"test": "nx run vitest:test",
|
|
70
79
|
"examples:generate": "node scripts/generate-examples.mjs",
|
|
71
80
|
"markdoc-schema:generate": "tsx scripts/generate-markdoc-schema.mjs",
|
|
@@ -17,7 +17,7 @@ Configure recheck for a project the way its maintainers would: measure first, de
|
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
npx recheck validate
|
|
20
|
+
npx recheck --validate-config
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
2. Add prose rules deliberately, not wholesale.
|
|
@@ -28,7 +28,7 @@ Configure recheck for a project the way its maintainers would: measure first, de
|
|
|
28
28
|
1. Run the whole corpus and count findings per rule:
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
npx recheck
|
|
31
|
+
npx recheck docs --output json --annotations-limit 5000 --output-path findings.json
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
Group the findings by `ruleName` and look at real examples of each before deciding anything.
|
|
@@ -53,7 +53,7 @@ Configure recheck for a project the way its maintainers would: measure first, de
|
|
|
53
53
|
When the corpus has too many errors to fix at once, record them and gate only new ones:
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
npx recheck baseline
|
|
56
|
+
npx recheck --generate-baseline
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
Commit `recheck-baseline.yaml` and add `baseline: recheck-baseline.yaml` to the config.
|
|
@@ -61,6 +61,6 @@ Counts only step down: when findings get fixed, regenerate the baseline and comm
|
|
|
61
61
|
|
|
62
62
|
## Finish
|
|
63
63
|
|
|
64
|
-
- `npx recheck validate` must pass.
|
|
64
|
+
- `npx recheck --validate-config` must pass.
|
|
65
65
|
- Every `off` and every exception carries a comment with its reason.
|
|
66
66
|
- The config's README section or the project docs say how contributors run recheck locally.
|
|
@@ -18,13 +18,13 @@ If none exists, this skill does not apply.
|
|
|
18
18
|
1. After you write or edit markdown files, run recheck on them:
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
npx recheck
|
|
21
|
+
npx recheck <file-or-directory>
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
2. If it reports errors, run the auto-fix first — most structural findings repair themselves:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
npx recheck
|
|
27
|
+
npx recheck <file-or-directory> --fix
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
3. Fix the remaining errors by hand.
|