Skip to content

Commit 61b8c30

Browse files
authored
feat(lint-md): add markdown lint & fix markdown error (#1466)
* feat(lint-md): add markdown lint & fix markdown error * fix(typo): remove typo dependence
1 parent ce8acaf commit 61b8c30

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

examples/biax/basic/API.zh.md

-10
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,3 @@ pointStyle: (x, y, colorField) => {
265265
## 图表组件
266266

267267
`xAxis``yAxis``legend``tooltip``label``theme` 等通用组件请参考图表通用配置
268-
269-
## 事件
270-
271-
[通用 events]()
272-
273-
### 点图形事件
274-
275-
| onPointClick<br />点点击事件 | onPointDblClick<br />点双击事件 | onPointDblClick<br />点双击事件 | onPointMouseleave<br />点鼠标离开事件 |
276-
| ------------------------------------ | ----------------------------------- | ---------------------------------- | ------------------------------------- |
277-
| onPointMousemove<br />点鼠标移动事件 | onPlotMousedown<br />点鼠标按下事件 | onPointMouseup<br />点鼠标松开事件 | onPointMouseenter<br />点鼠标进入事件 |

examples/histogram/basic/API.en.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: API
2+
title: API
33
---
44

55
# 配置属性
@@ -76,7 +76,7 @@ HistogramPlot.render();
7676

7777
**可选**, _string_
7878

79-
功能描述: 设置直方图的分箱宽度,binWidth 影响直方图分成多少箱, 不能与binNumber一起使用
79+
功能描述: 设置直方图的分箱宽度,binWidth 影响直方图分成多少箱, 不能与 binNumber 一起使用
8080

8181
默认配置: Sturges formula 计算得到
8282

examples/histogram/basic/API.zh.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ HistogramPlot.render();
7676

7777
**可选**, _string_
7878

79-
功能描述: 设置直方图的分箱宽度,binWidth 影响直方图分成多少箱, 不能与binNumber一起使用
79+
功能描述: 设置直方图的分箱宽度,binWidth 影响直方图分成多少箱, 不能与 binNumber 一起使用
8080

8181
默认配置: Sturges formula 计算得到
8282

package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
"site:build": "npm run site:clean && gatsby build --prefix-paths",
2929
"site:clean": "gatsby clean",
3030
"site:deploy": "npm run site:build && gh-pages -d public",
31-
"fix": "eslint --ext .ts ./src ./__tests__ --fix && prettier --write ./src ./__tests__",
31+
"fix": "eslint --ext .ts ./src ./__tests__ --fix && prettier --write ./src ./__tests__ && lint-md --fix ./examples",
3232
"build": "run-s clean lib dist",
3333
"clean": "rimraf lib esm dist",
3434
"lib": "run-p lib:*",
3535
"lib:cjs": "tsc -p tsconfig.json --target ES5 --module commonjs --outDir lib",
3636
"lib:esm": "tsc -p tsconfig.json --target ES5 --module ESNext --outDir esm",
3737
"dist": "webpack --config webpack.config.js --mode production",
38-
"lint": "eslint --ext .ts ./src ./__tests__",
38+
"lint": "eslint --ext .ts ./src ./__tests__ && prettier --check ./src ./__tests__ && lint-md ./examples",
3939
"lint-staged": "lint-staged",
4040
"test": "jest",
4141
"test-live": "cross-env DEBUG_MODE=1 jest --watch ./__tests__",
@@ -80,6 +80,7 @@
8080
"jest": "^26.0.1",
8181
"jest-electron": "^0.1.7",
8282
"jest-extended": "^0.11.2",
83+
"lint-md-cli": "^0.1.2",
8384
"lint-staged": "^10.0.7",
8485
"npm-run-all": "^4.1.5",
8586
"prettier": "^2.0.1",
@@ -112,6 +113,9 @@
112113
"*.ts": [
113114
"eslint --fix",
114115
"prettier --write"
116+
],
117+
"*.md": [
118+
"lint-md --fix"
115119
]
116120
},
117121
"license": "MIT"

0 commit comments

Comments
 (0)