From 626cfa474f671105c25a11463e5133a677bcb1c4 Mon Sep 17 00:00:00 2001 From: StarHeart Date: Wed, 24 Jan 2024 15:24:21 +0800 Subject: [PATCH] =?UTF-8?q?:construction=5Fworker:=20CI:=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=20prettier=20=E9=85=8D=E7=BD=AE=20(#2546)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .devcontainer/devcontainer.json | 30 +++++++++++++++--------------- .prettierrc | 14 +++++++++++++- tsconfig.json | 4 ++-- 3 files changed, 30 insertions(+), 18 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9dfc29a6..da76a2b2 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,7 @@ "name": "Default Linux Universal", "image": "mcr.microsoft.com/devcontainers/universal:2-linux", "features": { - "ghcr.io/devcontainers-contrib/features/poetry:2": {}, + "ghcr.io/devcontainers-contrib/features/poetry:2": {} }, "postCreateCommand": "poetry config virtualenvs.in-project true && poetry install -E all && poetry run pre-commit install && yarn install", "customizations": { @@ -15,31 +15,31 @@ "editor.defaultFormatter": "ms-python.black-formatter", "editor.codeActionsOnSave": { "source.fixAll.ruff": true, - "source.organizeImports": true, - }, + "source.organizeImports": true + } }, "[javascript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[html]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[javascriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[typescriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "files.exclude": { - "**/__pycache__": true, + "**/__pycache__": true }, "files.watcherExclude": { "**/target/**": true, - "**/__pycache__": true, - }, + "**/__pycache__": true + } }, "extensions": [ "ms-python.python", @@ -49,8 +49,8 @@ "charliermarsh.ruff", "EditorConfig.EditorConfig", "esbenp.prettier-vscode", - "bradlc.vscode-tailwindcss", - ], - }, - }, + "bradlc.vscode-tailwindcss" + ] + } + } } diff --git a/.prettierrc b/.prettierrc index 03175e1c..eee0e47e 100644 --- a/.prettierrc +++ b/.prettierrc @@ -5,5 +5,17 @@ "arrowParens": "always", "singleQuote": false, "trailingComma": "es5", - "semi": true + "semi": true, + "overrides": [ + { + "files": [ + "**/devcontainer.json", + "**/tsconfig.json", + "**/tsconfig.*.json" + ], + "options": { + "parser": "json" + } + } + ] } diff --git a/tsconfig.json b/tsconfig.json index 42b7c777..e2176982 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -38,8 +38,8 @@ /* Use tslib */ "importHelpers": true, - "noEmitHelpers": true, + "noEmitHelpers": true }, "include": ["./**/.eslintrc.js", "./**/.stylelintrc.js"], - "exclude": ["node_modules", "**/lib/**/*"], + "exclude": ["node_modules", "**/lib/**/*"] }