From 55b2d7adbd20088ab382638928eb6d35ffb86861 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 26 Nov 2023 22:23:08 +0900 Subject: [PATCH] Update to prettier v3 --- .prettierrc | 12 ---------- package.json | 4 ++-- pnpm-lock.yaml | 24 ++++++++++---------- prettier.config.js | 16 +++++++++++++ src/app.html | 2 +- src/routes/cheatsheet/_CheatSheetCard.svelte | 4 +++- 6 files changed, 34 insertions(+), 28 deletions(-) delete mode 100644 .prettierrc create mode 100644 prettier.config.js diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index aeee65193..000000000 --- a/.prettierrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "useTabs": true, - "singleQuote": true, - "trailingComma": "none", - "printWidth": 100, - "pluginSearchDirs": ["."], - "plugins": ["prettier-plugin-svelte"], - "overrides": [ - { "files": "*.svelte", "options": { "parser": "svelte" } }, - { "files": "*.svx", "options": { "parser": "mdx" } } - ] -} diff --git a/package.json b/package.json index 517892a9f..ffd48cbf3 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,8 @@ "lint-staged": "^13.2.3", "mdsvex": "^0.11.0", "package-name-regex": "^3.0.0", - "prettier": "^2.8.8", - "prettier-plugin-svelte": "^2.10.1", + "prettier": "^3.1.0", + "prettier-plugin-svelte": "^3.1.2", "rehype-slug": "^5.1.0", "svelte": "^4.0.5", "svelte-check": "^3.4.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b4a225db7..dae4a99aa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -57,11 +57,11 @@ devDependencies: specifier: ^3.0.0 version: 3.0.0 prettier: - specifier: ^2.8.8 - version: 2.8.8 + specifier: ^3.1.0 + version: 3.1.0 prettier-plugin-svelte: - specifier: ^2.10.1 - version: 2.10.1(prettier@2.8.8)(svelte@4.0.5) + specifier: ^3.1.2 + version: 3.1.2(prettier@3.1.0)(svelte@4.0.5) rehype-slug: specifier: ^5.1.0 version: 5.1.0 @@ -2201,19 +2201,19 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /prettier-plugin-svelte@2.10.1(prettier@2.8.8)(svelte@4.0.5): - resolution: {integrity: sha512-Wlq7Z5v2ueCubWo0TZzKc9XHcm7TDxqcuzRuGd0gcENfzfT4JZ9yDlCbEgxWgiPmLHkBjfOtpAWkcT28MCDpUQ==} + /prettier-plugin-svelte@3.1.2(prettier@3.1.0)(svelte@4.0.5): + resolution: {integrity: sha512-7xfMZtwgAWHMT0iZc8jN4o65zgbAQ3+O32V6W7pXrqNvKnHnkoyQCGCbKeUyXKZLbYE0YhFRnamfxfkEGxm8qA==} peerDependencies: - prettier: ^1.16.4 || ^2.0.0 - svelte: ^3.2.0 || ^4.0.0-next.0 + prettier: ^3.0.0 + svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0 dependencies: - prettier: 2.8.8 + prettier: 3.1.0 svelte: 4.0.5 dev: true - /prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} + /prettier@3.1.0: + resolution: {integrity: sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==} + engines: {node: '>=14'} hasBin: true dev: true diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 000000000..66b56a87e --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,16 @@ +// @ts-check + +/** @type {import('prettier').Config} */ +const config = { + useTabs: true, + singleQuote: true, + trailingComma: 'none', + printWidth: 100, + plugins: ['prettier-plugin-svelte'], + overrides: [ + { files: '*.svelte', options: { parser: 'svelte' } }, + { files: '*.svx', options: { parser: 'mdx' } } + ] +}; + +export default config; diff --git a/src/app.html b/src/app.html index d08fb54fa..09cbd58c1 100644 --- a/src/app.html +++ b/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/src/routes/cheatsheet/_CheatSheetCard.svelte b/src/routes/cheatsheet/_CheatSheetCard.svelte index f641a8c51..d0c3e2b80 100644 --- a/src/routes/cheatsheet/_CheatSheetCard.svelte +++ b/src/routes/cheatsheet/_CheatSheetCard.svelte @@ -66,7 +66,9 @@ height: var(--s-5); border-radius: 50%; background-color: var(--primary); - box-shadow: 25px 0 0 0 var(--caution), 50px 0 0 0 var(--success); + box-shadow: + 25px 0 0 0 var(--caution), + 50px 0 0 0 var(--success); margin-right: 50px; margin-left: 20px; }