diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..cb90c00 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..24dbd51 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,6 @@ +out/ +dist/ +release/ +node_modules/ +*.min.js +*.min.css \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json index 1a1e213..9134ee4 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,5 +1,7 @@ -{ - "tabWidth": 2, - "trailingComma": "es5", - "printWidth": 180 -} \ No newline at end of file +{ + "tabWidth": 2, + "trailingComma": "es5", + "printWidth": 200, + "semi": true, + "singleQuote": false +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..db51c00 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "editorconfig.editorconfig", "lokalise.i18n-ally"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 3b97e6e..5a1e7e5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,14 @@ -{ - "i18n-ally.localesPaths": [ - "src/renderer/src/locales" - ], - "i18n-ally.keystyle": "nested", - "i18n-ally.namespace": true, - "i18n-ally.sourceLanguage": "zh-CN", - "i18n-ally.enabledParsers": [ - "json" - ], -} \ No newline at end of file +{ + "i18n-ally.localesPaths": ["src/renderer/src/locales"], + "i18n-ally.keystyle": "nested", + "i18n-ally.namespace": true, + "i18n-ally.sourceLanguage": "zh-CN", + "i18n-ally.enabledParsers": ["json"], + + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit" + }, + "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"] +}