1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-02-10 13:56:01 +08:00
Files
408CSFamily/scripts/lint

23 lines
531 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
##
## 自动格式化
## - 代码
## - markdown文档
## 使用:
# - ./scripts/lint
## 参考链接:
## - https://eslint.org/docs/latest/use/getting-started
## - https://github.com/igorshubovych/markdownlint-cli
##
# 设置 PATH 环境变量避免command not found问题
export PATH="$(pnpm bin):$PATH"
# ESLint格式化代码
eslint --fix --ext .js,.ts,.vue --ignore-path .gitignore .
# markdown-cli格式化markdown 文档
markdownlint '**/*.md' -c .markdownlint.js -p .markdownlintignore --fix