Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: formatted with prettier #768

Merged
merged 2 commits into from
Apr 2, 2020
Merged

Conversation

kenve
Copy link
Contributor

@kenve kenve commented Apr 2, 2020

PR 修改内容说明

  • 使用 Prettier 格式化 Markdom 文件。
    npx prettier --config .prettierrc.js --write "{docs/**/*,**/{README,README.zh-cn}}.md"
  • contributor.md 贡献指南文档中的 folk 修正为 fork
  • 单词大小写,如: codesandbox 修改为 CodeSandbox

@CLAassistant
Copy link

CLAassistant commented Apr 2, 2020

CLA assistant check
All committers have signed the CLA.

@janryWang
Copy link
Collaborator

看到改动非常大,这个你本地看过效果没有

@kenve
Copy link
Contributor Author

kenve commented Apr 2, 2020

看到改动非常大,这个你本地看过效果没有

有在本地跑过文档展示效果,也过了一遍文件更改的内容,都只是根据项目 prettier 配置做格式化:

  • 数字和单词前后加空格。
  • JSX 中非组件属性使用单引号。
  • JSX 中行长度超过 80 换行。
  • 去除或增加空行、空格。
  • 箭头函数单个参数去除括号、箭头符前后加空格、返回表达式加括号(test => ())。
  • 对象符({ test:1 })内前后加空格。

@janryWang
Copy link
Collaborator

可以考虑给git提交hook加个自动prettier的脚本吧,不然后面写文档的时候,还是会出现问题

@kenve
Copy link
Contributor Author

kenve commented Apr 2, 2020

好的

@janryWang janryWang merged commit cb7f095 into alibaba:master Apr 2, 2020
ZirkleTsing pushed a commit that referenced this pull request May 14, 2020
* docs: formatted with prettier

* chore: add prettier auto-formatting on commit
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.

None yet

3 participants