Skip to content

ESlint 规范 #3

@xgqfrms

Description

@xgqfrms

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions