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

ESlint 规范 #3

Open
xgqfrms opened this issue Dec 25, 2019 · 2 comments
Open

ESlint 规范 #3

xgqfrms opened this issue Dec 25, 2019 · 2 comments
Labels
ESlint 规范 ESlint 规范

Comments

@xgqfrms
Copy link
Owner

xgqfrms commented Dec 25, 2019

ESlint 规范

image

image

image

使用spaces 缩进,不要时使用 tab

  1. 2 spaces,清新的知道几个 spaces 缩进
  2. tab 每个人的环境不同,存在等价于 2/4/8 spaces 等各种情况
  3. 使用 .editorconfig 插件
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2

https://editorconfig.org/

https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2019

@xgqfrms
Copy link
Owner Author

xgqfrms commented Dec 25, 2019

# EditorConfig
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

https://github.com/xgqfrms/web-full-stack/blob/master/.editorconfig

@xgqfrms xgqfrms added the ESlint 规范 ESlint 规范 label Dec 25, 2019
@xgqfrms
Copy link
Owner Author

xgqfrms commented Dec 25, 2019

http://git.piaoniu.com/pnc/mweb/issues/4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ESlint 规范 ESlint 规范
Projects
None yet
Development

No branches or pull requests

1 participant