1.0.2 • Published 3 years ago
umi3-plugin-lint v1.0.2
umi3-plugin-lint
install
$ npm install umi3-plugin-lint
usage
// .umirc.ts
{
lint: {
// eslint: true 运行时校验 js
// stylelint: true 运行时校验 css
},
plugins: ['umi3-plugin-lint']
}
$ npx umi use-lint # 生成 lintrc, stylelint, prettierrc, husky 配置或钩子
$ npm run lint # 执行 eslint, stylelint, prettier 校验
$ npm run lint:es # 执行 eslint 校验
$ npm run lint:style # 执行 stylelint 校验
$ npm run lint:prettier # 执行 prettier 校验
$ npm run prettier # 执行 prettier 美化代码
# commitlint
$ git add .
$ git commit -m 'test'
# ⧗ input: md
# ✖ subject may not be empty [subject-empty]
# ✖ type may not be empty [type-empty]
# ✖ found 2 problems, 0 warnings
dependencies
- npx: 执行项目内部模块,npx umi lint
- umi: 插件式研发框架
- webpack-chain: webpack 链式操作
- eslint-webpack-plugin: 运行时校验 js
- stylelint-webpack-plugin: 运行时校验 js
- eslint: js 校验
- stylelint: style 校验
- prettier: 代码美化
- lint-staged: 对 git add 暂存的文件作 lint 检查等,即它会可以区别出 git 暂存的文件
- husky: git 钩子
- commitlint: 提交校验
- @umijs/fabric: umi 官方推荐的校验配置
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago
0.20.0
3 years ago
0.19.0
3 years ago
0.18.0
3 years ago
0.17.0
3 years ago
0.16.0
3 years ago
0.15.0
3 years ago
0.13.0
3 years ago
0.12.0
3 years ago
0.11.0
3 years ago
0.10.0
3 years ago
0.9.0
3 years ago
0.8.0
3 years ago
0.7.0
3 years ago
0.6.0
3 years ago
0.5.0
3 years ago
0.4.0
3 years ago
0.3.0
3 years ago
0.2.0
3 years ago
0.1.0
3 years ago