2.21.15 • Published 2 years ago

zhouhaifei-code-style v2.21.15

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

换行符说明(windows)

// 提交时验证
# 拒绝提交包含混合换行符的文件
git config --global core.safecrlf true

# 允许提交包含混合换行符的文件
git config --global core.safecrlf false

# 提交包含混合换行符的文件时给出警告
git config --global core.safecrlf warn

// 下拉提交时操作
# 提交时转换为LF,检出时转换为CRLF
git config --global core.autocrlf true

# 提交时转换为LF,检出时不转换
git config --global core.autocrlf input

# 提交检出均不转换
git config --global core.autocrlf false

# 参考配置
git config --global core.safecrlf true
git config --global core.autocrlf input

lint 工具说明

  • 注意 prettier,别混用。先用 ide 自带的格式化,再以自动保存格式化。基本没什么错误。出错请对照下面插件找相关原因。如果是第三方插件的错误,看情况忽略错误
  • eslint
  • stylelint
  • commitLint
    • commitLint 里面有相关提交类型的说明
    • commitlint-config-conventional
    • cz git commit 辅助工具,一般只需要前三步。比如: feat(需求号): 描述 feat 对应第一步类型,需求号对应第二步,描述对应第三步

具体使用

  • 安装 eslint、typescript、stylelint、prettier、@commitlint/cli
  • eslint
// 创建.eslintrc.js文件
module.exports = require('zhouhaifei-code-style').react;
//
  • styleLint
// 创建stylelint.config.js文件
module.exports = require('zhouhaifei-code-style').stylelint;
//
  • prettier
// 创建prettier.config.js文件
module.exports = require('zhouhaifei-code-style').prettier;
//
  • commitlint
// 创建commitlint.config.js文件
module.exports = require('zhouhaifei-code-style').commitlint;
//
2.21.3

2 years ago

2.21.15

2 years ago

2.21.14

2 years ago

2.21.0

3 years ago

2.19.0

3 years ago

2.20.0

3 years ago

2.20.1

3 years ago

2.17.3

3 years ago

2.18.11

3 years ago

2.18.0

3 years ago

2.17.0

3 years ago

2.16.4

3 years ago

2.16.1

3 years ago

2.16.0

3 years ago

2.15.1

3 years ago

2.13.15

3 years ago

2.13.13

3 years ago

2.13.10

3 years ago

2.10.7

4 years ago

2.10.4

4 years ago

2.10.2

4 years ago

2.10.1

4 years ago

2.10.0

4 years ago

2.9.20

4 years ago

2.9.21

4 years ago

2.9.16

4 years ago

2.9.9

4 years ago

2.9.10

4 years ago

2.9.11

4 years ago

2.9.0

4 years ago

2.8.3

4 years ago

2.8.2

4 years ago

2.8.1

4 years ago

2.7.2

4 years ago

2.7.0

4 years ago

2.7.1

4 years ago

2.6.14

4 years ago

2.6.13

4 years ago

2.6.3

4 years ago

2.6.0

4 years ago

2.5.5

4 years ago

2.5.3

4 years ago

2.5.2

4 years ago

2.5.1

4 years ago

2.5.0

4 years ago

2.2.4

4 years ago

2.2.3

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.0.0

4 years ago

1.3.16

4 years ago

1.3.13

4 years ago

1.3.10

4 years ago

1.3.11

4 years ago

1.3.8

4 years ago

1.3.3

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago