From e69be56bbd3aca25dd13ae0fa86633ec708b3dcf Mon Sep 17 00:00:00 2001 From: ukorvl Date: Mon, 20 Nov 2023 18:02:37 +0400 Subject: [PATCH] add vscode settings to format files on save --- .eslintignore | 1 + .gitignore | 3 +++ .prettierignore | 1 - .prettierrc | 11 +---------- .vscode/settings.json | 17 +++++++++++++++++ 5 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.eslintignore b/.eslintignore index 2a2cd584..9400b532 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,3 +4,4 @@ coverage scripts .github .husky +.vscode diff --git a/.gitignore b/.gitignore index 7eb41beb..6df73f7a 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,6 @@ yarn-error.log* # runtime configuration in development mode runtime-config.dev.toml + +.vscode/* +!.vscode/settings.json diff --git a/.prettierignore b/.prettierignore index 8fa06d7f..e3fbd983 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,2 @@ build node_modules -coverage diff --git a/.prettierrc b/.prettierrc index e8b983b4..ae93c3cc 100644 --- a/.prettierrc +++ b/.prettierrc @@ -5,14 +5,5 @@ "singleQuote": true, "arrowParens": "avoid", "jsxSingleQuote": false, - "singleAttributePerLine": true, - "overrides": [ - { - "files": "**/*.scss", - "options": { - "singleQuote": false, - "printWidth": 80 - } - } - ] + "singleAttributePerLine": true } diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..9910d572 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,17 @@ +{ + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + }, + "editor.formatOnSave": true, + "editor.formatOnPaste": true, + "editor.formatOnType": true, +}