From d9aa4d9e6007880f7825bf041e2cf2ae4314efd2 Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Sun, 21 Mar 2021 15:06:21 +0100 Subject: [PATCH] Added tasks --- .vscode/tasks.json | 11 +++++++++++ scripts/format_documents.ps1 | 8 ++++++++ scripts/json.prettierrc.json | 9 +++++++++ 3 files changed, 28 insertions(+) create mode 100644 .vscode/tasks.json create mode 100644 scripts/format_documents.ps1 create mode 100644 scripts/json.prettierrc.json diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..dc05189c --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,11 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "shell", + "label": "Format workspace", + "command": "Powershell.exe -executionpolicy remotesigned -File ./scripts/format_documents.ps1", + "problemMatcher": "$tsc" + } + ] +} diff --git a/scripts/format_documents.ps1 b/scripts/format_documents.ps1 new file mode 100644 index 00000000..6b6d7656 --- /dev/null +++ b/scripts/format_documents.ps1 @@ -0,0 +1,8 @@ +git add . +git commit + +npx prettier --write "source/**/*.json" --config ./scripts/json.prettierrc.json +git submodule foreach git add **/*.json +git submodule foreach git commit -m "auto: Formatted json files" +git add **/*.json +git commit -m "auto: Formatted json files" \ No newline at end of file diff --git a/scripts/json.prettierrc.json b/scripts/json.prettierrc.json new file mode 100644 index 00000000..cc1240c9 --- /dev/null +++ b/scripts/json.prettierrc.json @@ -0,0 +1,9 @@ +{ + "tabWidth": 2, + "printWidth": 180, + "useTabs": false, + "bracketSpacing": true, + "arrowParens": "always", + "endOfLine": "crlf", + "embeddedLanguageFormatting": "auto" +}