dsh-tablelint 0.1.0 → 0.1.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 +23 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
A ragged table renders correctly in the editor that produced it and broken everywhere it is published. Cell counts are cheap to compare and expensive to notice by eye.
|
|
4
4
|
|
|
5
|
+
<!-- example:start -->
|
|
6
|
+
## 真实输入输出
|
|
7
|
+
|
|
8
|
+
输入:
|
|
9
|
+
|
|
10
|
+
```markdown
|
|
11
|
+
| 项目 | 数量 |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| 一 | 2 |
|
|
14
|
+
| 三 | 4 | 6 |
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
真实运行(逐字输出,由测试与工具保持同步):
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
$ tablelint report-table.md
|
|
21
|
+
error column-count line 4: 3 cells in a 2-column table
|
|
22
|
+
fail: 1 errors, 0 warnings
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
出口码:1。
|
|
26
|
+
<!-- example:start -->
|
|
27
|
+
|
|
5
28
|
```bash
|
|
6
29
|
npx tablelint report.md # human output, exit 1 on findings
|
|
7
30
|
npx tablelint report.md --json # machine output for a pipeline
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-tablelint",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Markdown table check for generated reports: rows with the wrong cell count, a delimiter row that disagrees with the header, duplicate or empty headers, and tables with no rows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": ">=22.19.0"
|
|
20
|
+
"node": ">=22.19.0",
|
|
21
|
+
"dsh": ">=0.2.2-rc.1 <0.3.0-0"
|
|
21
22
|
},
|
|
22
23
|
"files": [
|
|
23
24
|
"src",
|