Skip to content

Commit

Permalink
chore(eslint): add more code style config (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
cycleccc authored Sep 30, 2024
1 parent 7d067a0 commit c35b12a
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 49 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: http://EditorConfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
insert_final_newline = true
max_line_length = 100
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
83 changes: 34 additions & 49 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,35 @@
{
"editor.formatOnSave": true,
"cSpell.words": [
"beforeinput",
"bodyparser",
"browserslist",
"chmod",
"clonedeep",
"compositionend",
"compositionstart",
"config",
"contenteditable",
"elems",
"hoverbar",
"img",
"isequal",
"js",
"keyscan",
"luochao",
"middlewares",
"mkdir",
"next",
"nocheck",
"prettier",
"prettierrc",
"prismjs",
"snabbdom",
"src",
"team",
"tecent",
"toarray",
"ts",
"uppy",
"vdom",
"vnode",
"wangeditor",
"wangfupeng",
"we",
"write",
"yuque"
],
"typescript.tsdk": "node_modules/typescript/lib",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.validate": ["javascript"],

"editor.detectIndentation": false,
"editor.tabSize": 2
}
"editor.formatOnSave": true,
"editor.detectIndentation": false,
"editor.tabSize": 2,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
},
"eslint.format.enable": true,
"eslint.run": "onSave",
"eslint.options": {
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
},
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"files.eol": "\n"
}

0 comments on commit c35b12a

Please sign in to comment.