Skip to content

Conversation

@donaldshen
Copy link

Why

模板代码未经过prettier格式化,导致组件代码的commit记录出现格式修改

How

  1. 使用prettier格式化js、vue、json代码,现在json也会在pre-commit阶段格式化
  2. 因为已经有了stylelint,那么stylus(stylelint不支持) => less(项目都在用)
  3. 其他:README目录补全、GUIDE每篇单独一页

Test

  1. 使用新旧cli各生成一个模板项目,并git init
  2. 两个项目均添加lodash依赖,并稍微想改component.vue代码,然后commit
  3. 以下是git diff的结果

before

component.vue
image
package.json
image

after

component.vue
image
package.json
image

@levy9527 levy9527 merged commit 29ca5f4 into FEMessage:dev Aug 8, 2019
@donaldshen donaldshen deleted the fix-format branch August 8, 2019 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants