@yuu1111/comment-check 2.2.1 → 2.2.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.ja.md +13 -13
- package/README.md +12 -15
- package/package.json +2 -2
package/README.ja.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# @yuu1111/comment-check
|
|
4
4
|
|
|
5
|
-
baselineを持つ小さなcomment
|
|
5
|
+
baselineを持つ小さなcomment検査で、抑制commentとplaceholder commentの増殖を止める
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ comment-check --update-baseline .
|
|
|
19
19
|
comment-check .
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
```
|
|
22
|
+
```text
|
|
23
23
|
src/queue.ts:18:2 undocumented-directive TypeScript directive needs a description
|
|
24
24
|
Checked 42 files: 1 new, 0 resolved, 3 baselined
|
|
25
25
|
```
|
|
@@ -38,21 +38,21 @@ comment-check --enable cramped-comment .
|
|
|
38
38
|
|
|
39
39
|
## Rules
|
|
40
40
|
|
|
41
|
-
| Rule | 検出対象 |
|
|
42
|
-
|
|
43
|
-
| `broad-suppression` | `biome-ignore-all`、`@ts-nocheck`、ruleを書いていない `eslint-disable` |
|
|
44
|
-
| `cramped-comment` | 直前の行へ空行なしで続く複数行comment
|
|
45
|
-
| `undocumented-directive` | 説明の無い `@ts-ignore` と `@ts-expect-error` |
|
|
46
|
-
| `placeholder-comment` | `TODO`、`FIXME`、`XXX`、`HACK` |
|
|
47
|
-
| `separator-comment` | 記号だけで作った装飾comment |
|
|
48
|
-
| `japanese-period` | 日本語の文を終える `。` を含むcomment
|
|
41
|
+
| Rule | 重大度 | Default | 検出対象 |
|
|
42
|
+
|------|----------|---------|---------|
|
|
43
|
+
| `broad-suppression` | error | true | `biome-ignore-all`、`@ts-nocheck`、ruleを書いていない `eslint-disable` |
|
|
44
|
+
| `cramped-comment` | error | false | 直前の行へ空行なしで続く複数行comment |
|
|
45
|
+
| `undocumented-directive` | error | true | 説明の無い `@ts-ignore` と `@ts-expect-error` |
|
|
46
|
+
| `placeholder-comment` | error | true | `TODO`、`FIXME`、`XXX`、`HACK` |
|
|
47
|
+
| `separator-comment` | error | true | 記号だけで作った装飾comment |
|
|
48
|
+
| `japanese-period` | error | false | 日本語の文を終える `。` を含むcomment |
|
|
49
49
|
|
|
50
50
|
## Options
|
|
51
51
|
|
|
52
|
-
| Option |
|
|
52
|
+
| Option | 説明 |
|
|
53
53
|
|--------|-------------|
|
|
54
54
|
| `--baseline <path>` | 読み書きするbaseline file(既定は `comment-baseline.json`) |
|
|
55
|
-
| `--enable <rule>` | opt-in rule
|
|
56
|
-
| `--ignore <path>` | 検査から外すpath
|
|
55
|
+
| `--enable <rule>` | opt-in ruleを実行する、複数指定できる、未知の名前は設定error |
|
|
56
|
+
| `--ignore <path>` | 検査から外すpath、複数指定できる |
|
|
57
57
|
| `--update-baseline` | baselineを現在の検出で置き換える |
|
|
58
58
|
| `--json` | 新規と解消済みの検出をJSONで出力する |
|
package/README.md
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# @yuu1111/comment-check
|
|
4
4
|
|
|
5
|
-
Small comment checker with a baseline, used to keep suppressions and placeholder
|
|
6
|
-
comments from spreading.
|
|
5
|
+
Small comment checker with a baseline, used to keep suppressions and placeholder comments from spreading.
|
|
7
6
|
|
|
8
7
|
## Install
|
|
9
8
|
|
|
@@ -20,20 +19,18 @@ comment-check --update-baseline .
|
|
|
20
19
|
comment-check .
|
|
21
20
|
```
|
|
22
21
|
|
|
23
|
-
```
|
|
22
|
+
```text
|
|
24
23
|
src/queue.ts:18:2 undocumented-directive TypeScript directive needs a description
|
|
25
24
|
Checked 42 files: 1 new, 0 resolved, 3 baselined
|
|
26
25
|
```
|
|
27
26
|
|
|
28
|
-
A project that also keeps Japanese sentences free of a trailing `。` names the
|
|
29
|
-
opt-in rule:
|
|
27
|
+
A project that also keeps Japanese sentences free of a trailing `。` names the opt-in rule:
|
|
30
28
|
|
|
31
29
|
```bash
|
|
32
30
|
comment-check --enable japanese-period .
|
|
33
31
|
```
|
|
34
32
|
|
|
35
|
-
A project that keeps a blank line before every multi-line comment names the
|
|
36
|
-
other opt-in rule:
|
|
33
|
+
A project that keeps a blank line before every multi-line comment names the other opt-in rule:
|
|
37
34
|
|
|
38
35
|
```bash
|
|
39
36
|
comment-check --enable cramped-comment .
|
|
@@ -41,14 +38,14 @@ comment-check --enable cramped-comment .
|
|
|
41
38
|
|
|
42
39
|
## Rules
|
|
43
40
|
|
|
44
|
-
| Rule | Detects |
|
|
45
|
-
|
|
46
|
-
| `broad-suppression` | `biome-ignore-all`, `@ts-nocheck`, and rule-less `eslint-disable` |
|
|
47
|
-
| `cramped-comment` | a multi-line block comment written directly under the previous line
|
|
48
|
-
| `undocumented-directive` | `@ts-ignore` or `@ts-expect-error` without a description |
|
|
49
|
-
| `placeholder-comment` | `TODO`, `FIXME`, `XXX`, `HACK` |
|
|
50
|
-
| `separator-comment` | decorative comments made only of punctuation |
|
|
51
|
-
| `japanese-period` | a Japanese sentence in a comment that ends with `。`
|
|
41
|
+
| Rule | Severity | Default | Detects |
|
|
42
|
+
|------|----------|---------|---------|
|
|
43
|
+
| `broad-suppression` | error | true | `biome-ignore-all`, `@ts-nocheck`, and rule-less `eslint-disable` |
|
|
44
|
+
| `cramped-comment` | error | false | a multi-line block comment written directly under the previous line |
|
|
45
|
+
| `undocumented-directive` | error | true | `@ts-ignore` or `@ts-expect-error` without a description |
|
|
46
|
+
| `placeholder-comment` | error | true | `TODO`, `FIXME`, `XXX`, `HACK` |
|
|
47
|
+
| `separator-comment` | error | true | decorative comments made only of punctuation |
|
|
48
|
+
| `japanese-period` | error | false | a Japanese sentence in a comment that ends with `。` |
|
|
52
49
|
|
|
53
50
|
## Options
|
|
54
51
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuu1111/comment-check",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "Shared comment and suppression checker",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/yuu1111/configs.git",
|
|
8
|
-
"directory": "packages/comment-check"
|
|
8
|
+
"directory": "packages/engine/comment-check"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
11
|
"bin": {
|