diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..efb4918cf --- /dev/null +++ b/.editorconfig @@ -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 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..6313b56c5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.vscode/settings.json b/.vscode/settings.json index adc052352..7223f4f14 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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 -} \ No newline at end of file + "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" +}