@yuu1111/quality-check 0.5.1 → 0.7.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.ja.md CHANGED
@@ -35,7 +35,8 @@ export default defineConfig({
35
35
  "tsdoc-check": true,
36
36
  },
37
37
  config: {
38
- "comment-check": { ignore: ["another-project"] },
38
+ "comment-check": { enable: ["japanese-period"], ignore: ["another-project"] },
39
+ "document-style-check": { enable: ["japanese-period"] },
39
40
  "tsdoc-check": { error: ["missing-doc"] },
40
41
  },
41
42
  });
@@ -72,10 +73,10 @@ engineは `biome` → `typecheck` → `knip` → `comment-check` → `document-s
72
73
  | engine | 起動するcommand | 受け取る条件 |
73
74
  |--------|-----------------|--------------|
74
75
  | `biome` | `biome check` | `targets`、`args` 除外pathは `biome.json` が持つ |
75
- | `typecheck` | `tsc --noEmit` | `args` 設定は `tsconfig.json` が持つ |
76
+ | `typecheck` | `tsc --noEmit` | `args`、`projects` 設定は `tsconfig.json` が持つ |
76
77
  | `knip` | `knip` | `args` 設定は `knip.ts` が持つ |
77
- | `comment-check` | `comment-check --json` | `ignore`、`targets`、`args` |
78
- | `document-style-check` | `document-style-check lint --json` | `ignore`、`targets`、`args` |
78
+ | `comment-check` | `comment-check --json` | `ignore`、`targets`、`args`、`enable`(有効にするrule名) |
79
+ | `document-style-check` | `document-style-check lint --json` | `ignore`、`targets`、`args`、`enable`(有効にするrule名) |
79
80
  | `tsdoc-check` | `tsdoc-check --json` | `ignore`、`targets`、`args`、`error`(違反として扱うrule名) |
80
81
 
81
82
  `args` はengineの既定引数の後ろへ足す 設定fileで表せない起動条件や、engineの引数が変わったときの逃げ道として使う
@@ -113,8 +114,7 @@ engineのbinaryは利用Projectの `node_modules/.bin` から実行時に解決
113
114
 
114
115
  `comment-check` はbaseline差分を無効化する未作成のpathを渡して起動する 新規と解消済みの判定はengineごとではなく統合CLIが1つのbaseline fileで行うため、既存の `comment-baseline.json` がある場合は `--update-baseline` で移す
115
116
 
116
- `typecheck` は `tsc --noEmit` を回すだけなので、tsconfigを複数持つProjectは対象のtsconfigごとに起動する必要がある
117
+ `enable` は `comment-check` `document-style-check` のopt-in ruleだけを受け取り、それぞれのcommandの `--enable <rule>` になる 他のengineへ書くとunknown optionとして拒否し、既定のrule集合は変えない このCLIはengineを同梱しないため、opt-in ruleを有効にするProjectは対応するengine packageも同じ変更で更新する
117
118
 
118
- ## License
119
+ `typecheck` は `projects` に並べたtsconfigごとに `tsc --noEmit -p <path>` を起動する 省略時はカレントの `tsconfig.json` を1回だけ読み、`args` はすべての起動へ足す
119
120
 
120
- MIT
package/README.md CHANGED
@@ -38,7 +38,8 @@ export default defineConfig({
38
38
  "tsdoc-check": true,
39
39
  },
40
40
  config: {
41
- "comment-check": { ignore: ["another-project"] },
41
+ "comment-check": { enable: ["japanese-period"], ignore: ["another-project"] },
42
+ "document-style-check": { enable: ["japanese-period"] },
42
43
  "tsdoc-check": { error: ["missing-doc"] },
43
44
  },
44
45
  });
@@ -78,10 +79,10 @@ engine in `config`. Each engine runs:
78
79
  | Engine | Command | Conditions |
79
80
  |--------|---------|------------|
80
81
  | `biome` | `biome check` | `targets`, `args`; `biome.json` holds the excluded paths |
81
- | `typecheck` | `tsc --noEmit` | `args`; `tsconfig.json` holds the settings |
82
+ | `typecheck` | `tsc --noEmit` | `args`, `projects`; `tsconfig.json` holds the settings |
82
83
  | `knip` | `knip` | `args`; `knip.ts` holds the settings |
83
- | `comment-check` | `comment-check --json` | `ignore`, `targets`, `args` |
84
- | `document-style-check` | `document-style-check lint --json` | `ignore`, `targets`, `args` |
84
+ | `comment-check` | `comment-check --json` | `ignore`, `targets`, `args`, `enable` (rule names to turn on) |
85
+ | `document-style-check` | `document-style-check lint --json` | `ignore`, `targets`, `args`, `enable` (rule names to turn on) |
85
86
  | `tsdoc-check` | `tsdoc-check --json` | `ignore`, `targets`, `args`, `error` (rule names to fail on) |
86
87
 
87
88
  `args` is appended after the engine defaults, for conditions the config cannot
@@ -132,9 +133,12 @@ finding. The new-and-resolved diff is done by this CLI from a single baseline
132
133
  file, so an existing `comment-baseline.json` is moved over with
133
134
  `--update-baseline`.
134
135
 
135
- `typecheck` only runs `tsc --noEmit`, so a project with more than one tsconfig
136
- has to start it once per target.
136
+ `enable` names the opt-in rules of `comment-check` and `document-style-check`
137
+ and becomes `--enable <rule>` on each of their commands. The other engines
138
+ reject the field, and the default rule set stays as it is. This CLI ships no
139
+ engine of its own, so a project that turns an opt-in rule on updates the
140
+ matching engine package in the same change.
137
141
 
138
- ## License
139
-
140
- MIT
142
+ `typecheck` starts `tsc --noEmit -p <path>` once per path in `projects`. Without
143
+ it the current `tsconfig.json` is read once, and `args` are added to every
144
+ start.