mirror of
https://github.com/142vip/408CSFamily.git
synced 2026-04-14 18:30:30 +08:00
feat:删除markdownlint-cli模块、lint脚本和相关配置,统一使用Eslint校验
This commit is contained in:
29
scripts/lint
29
scripts/lint
@@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
##
|
||||
## 自动格式化
|
||||
## - 代码
|
||||
## - markdown文档
|
||||
## 使用:
|
||||
# - ./scripts/lint 校验
|
||||
# - ./scripts/lint --fix 格式化
|
||||
## 参考链接:
|
||||
## - https://eslint.org/docs/latest/use/getting-started
|
||||
## - https://github.com/igorshubovych/markdownlint-cli
|
||||
##
|
||||
|
||||
# 设置 PATH 环境变量,避免command not found问题
|
||||
export PATH="$(pnpm bin):$PATH"
|
||||
|
||||
# 是否fix
|
||||
fixed=${1}
|
||||
|
||||
## ESLint格式化代码
|
||||
#echo "step1: eslint $fixed --ext .js,.ts,.vue --ignore-path .gitignore ."
|
||||
#eslint $fixed --ext .js,.ts,.vue --ignore-path .gitignore .
|
||||
|
||||
# markdown-cli格式化markdown 文档
|
||||
echo "step2: markdownlint '**/*.md' -c .markdownlint.js -p .markdownlintignore $fixed"
|
||||
markdownlint '**/*.md' -c .markdownlint.js -p .markdownlintignore $fixed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user