0.0.2-alpha • Published 2 years ago

eslint-blm v0.0.2-alpha

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
2 years ago

eslint-blm

白龙马eslint自动配置工具使用说明

为项目集成eslint+husky+lint staged+commintLint功能,提供规范化的开发

使用

npm i eslint-blm -D
// or
yarn add eslint-blm -D

命令介绍

// 没有参数则手动多选
npx eslint-blm

// 通过提供的参数进行选择性安装
npx eslint-blm -D eslint editorConfig commit

// 安装必备功能eslint editorConfig commit
npx eslint-blm --init

自动修复文件

// 指定目录
npx eslint src/xxx --fix
// 所有
npx eslint . --fix

查看

// 查看目前所支持的工具
npx eslint-blm --list

功能列表

  1. 通过eslint强制统一代码风格,不符合校验则报错,通过配合vscode eslint 插件修正&手动命令修正
  2. 通过husky的命令钩子来监测并阻止将不规范的代码提交到远程
  3. 通过lint-staged将git暂存区的文件执行配置的linter任务
  4. 通过commitlint规范化提交信息

eslint文档地址: https://eslint.org/docs/user-guide/configuring/

husky 文档地址:https://typicode.github.io/husky/#/?id=automatic-recommended

lint-staged文档地址:https://github.com/okonet/lint-staged#example-ignore-files-from-match

commitlint 文档地址:https://github.com/conventional-changelog/commitlint

0.0.2-alpha

2 years ago

0.0.1-alpha

2 years ago

1.1.2

2 years ago

1.1.0

2 years ago

0.0.6

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.1

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago