From 1cf0f24d8e609a87582e7ecb921b0dda5f8dfc23 Mon Sep 17 00:00:00 2001 From: Tobias Date: Wed, 14 Jun 2023 15:37:53 +0200 Subject: [PATCH] Prettier: Move config from cli to prettierrc file This way they are applied globally and "on save" --- .prettierrc.json | 4 +++- package.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.prettierrc.json b/.prettierrc.json index 65a69c06b..34f9bb0ac 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -2,5 +2,7 @@ "semi": false, "printWidth": 100, "plugins": ["prettier-plugin-svelte"], - "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }], + "svelteBracketNewLine": false, + "htmlWhitespaceSensitivity": "ignore" } diff --git a/package.json b/package.json index f377d33d7..350b689ac 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "generate": "mkdir -p ./assets/generated; npm run generate:licenses; npm run generate:images; npm run generate:charging-stations; npm run generate:translations; npm run reset:layeroverview; npm run generate:service-worker", "generate:charging-stations": "cd ./assets/layers/charging_station && vite-node csvToJson.ts && cd -", "prepare-deploy": "npm run generate:service-worker && ./scripts/build.sh", - "format": "prettier --write --svelte-bracket-new-line=false --html-whitespace-sensitivity=ignore '**/*.ts' '**/*.svelte'", + "format": "prettier --write '**/*.ts' '**/*.svelte'", "clean:tests": "(find . -type f -name \"*.doctest.ts\" | xargs -r rm)", "clean": "rm -rf .cache/ && (find *.html | grep -v \"^\\(404\\|index\\|land\\|test\\|preferences\\|customGenerator\\|professional\\|automaton\\|import_helper\\|import_viewer\\|theme\\|style_test\\).html\" | xargs -r rm) && (ls | grep \"^index_[a-zA-Z_-]\\+\\.ts$\" | xargs -r rm) && (ls | grep \".*.webmanifest$\" | grep -v \"manifest.webmanifest\" | xargs -r rm)", "generate:dependency-graph": "node_modules/.bin/depcruise --exclude \"^node_modules\" --output-type dot Logic/State/MapState.ts > dependencies.dot && dot dependencies.dot -T svg -o dependencies.svg && rm dependencies.dot",