From 4ff82b410f55c3a7f760f73e7ac900cb35612e14 Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Sat, 28 May 2022 00:15:31 +0900 Subject: [PATCH] style: format code --- .prettierignore | 7 +++++++ package.json | 12 ++++++++---- .../theme-default/styles/components/custom-block.css | 2 +- tsconfig.json | 5 +---- 4 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..3b6e8917 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,7 @@ +/docs +/examples +*.css +*.md +*.vue +dist +pnpm-lock.yaml diff --git a/package.json b/package.json index ecda9943..50e9c534 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "vitepress", "version": "1.0.0-draft.4", + "description": "Vite & Vue powered static site generator", "type": "module", "packageManager": "pnpm@7.0.1", - "description": "Vite & Vue powered static site generator", "main": "dist/node/index.js", "types": "types/index.d.ts", "exports": { @@ -53,9 +53,13 @@ "build-prepare": "rimraf dist && node scripts/copyShared", "build-client": "tsc -p src/client && node scripts/copyClient", "build-node": "rollup --config rollup.config.ts --configPlugin esbuild", - "format": "prettier --write .", + "format": "prettier --check --write .", + "format-fail": "prettier --check .", "lint": "pnpm run format", + "lint-fail": "pnpm run format-fail", "test": "vitest -r __tests__", + "test-run": "vitest run -r __tests__", + "check": "run-s lint test-run", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "release": "node scripts/release.js", "docs": "run-p dev docs-dev", @@ -140,9 +144,9 @@ "peerDependencyRules": { "ignoreMissing": [ "@algolia/client-search", + "@types/react", "react", - "react-dom", - "@types/react" + "react-dom" ] } }, diff --git a/src/client/theme-default/styles/components/custom-block.css b/src/client/theme-default/styles/components/custom-block.css index c8ebeae6..81bc71e4 100644 --- a/src/client/theme-default/styles/components/custom-block.css +++ b/src/client/theme-default/styles/components/custom-block.css @@ -78,7 +78,7 @@ color: inherit; font-weight: 600; text-decoration: underline; - transition: opacity .25s; + transition: opacity 0.25s; } .custom-block a:hover { diff --git a/tsconfig.json b/tsconfig.json index 504cbcb3..1ca3b78d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,8 +10,5 @@ "resolveJsonModule": true, "lib": ["ESNext", "DOM"] }, - "exclude": [ - "**/node_modules/**", - "**/dist/**" - ] + "exclude": ["**/node_modules/**", "**/dist/**"] }