From 34a757c774cb7694145e25a14c9bfe876f7207d7 Mon Sep 17 00:00:00 2001 From: Lars Kappert Date: Wed, 18 Sep 2024 07:36:32 +0200 Subject: [PATCH] Fix formatting --- biome.json | 5 +++++ packages/docs/src/fonts/font-face.css | 18 ++++++++++-------- packages/docs/src/styles/links.css | 4 +--- packages/docs/src/styles/sponsors.css | 3 --- packages/knip/src/ConfigurationChief.ts | 2 +- packages/knip/src/IssueFixer.ts | 4 ++-- packages/knip/src/util/to-source-path.ts | 2 +- 7 files changed, 20 insertions(+), 18 deletions(-) diff --git a/biome.json b/biome.json index 544bc1092..7a355f796 100644 --- a/biome.json +++ b/biome.json @@ -62,6 +62,11 @@ "lineWidth": 80 } }, + "css": { + "formatter": { + "quoteStyle": "single" + } + }, "overrides": [ { "include": ["*.astro"], diff --git a/packages/docs/src/fonts/font-face.css b/packages/docs/src/fonts/font-face.css index 75cdb59ec..c73a93924 100644 --- a/packages/docs/src/fonts/font-face.css +++ b/packages/docs/src/fonts/font-face.css @@ -9,9 +9,9 @@ font-style: italic; font-weight: 200; font-display: swap; - src: url('./6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZYokSds18S0xR41.woff2') - format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + src: url('./6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZYokSds18S0xR41.woff2') format('woff2'); + unicode-range: + U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @@ -20,9 +20,9 @@ font-style: italic; font-weight: 300; font-display: swap; - src: url('./6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZZMkids18S0xR41.woff2') - format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + src: url('./6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZZMkids18S0xR41.woff2') format('woff2'); + unicode-range: + U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @@ -32,7 +32,8 @@ font-weight: 300; font-display: swap; src: url('./6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdu3cOWxw.woff2') format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + unicode-range: + U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @@ -42,7 +43,8 @@ font-weight: 400; font-display: swap; src: url('./6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7lujVj9w.woff2') format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + unicode-range: + U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } diff --git a/packages/docs/src/styles/links.css b/packages/docs/src/styles/links.css index 37c3179bd..8db5f970d 100644 --- a/packages/docs/src/styles/links.css +++ b/packages/docs/src/styles/links.css @@ -28,9 +28,7 @@ border-bottom: none; opacity: 0; color: var(--sl-color-text); - transition: - color 0.3s, - opacity 0.3s; + transition: color 0.3s, opacity 0.3s; } &:hover a { diff --git a/packages/docs/src/styles/sponsors.css b/packages/docs/src/styles/sponsors.css index 56fed2276..0f8241d0d 100644 --- a/packages/docs/src/styles/sponsors.css +++ b/packages/docs/src/styles/sponsors.css @@ -21,9 +21,6 @@ flex-direction: row; align-items: unset; } - - .sponsors-body > .column:first-of-type { - } } .sponsors { diff --git a/packages/knip/src/ConfigurationChief.ts b/packages/knip/src/ConfigurationChief.ts index 41c17fb5a..8b6bbf536 100644 --- a/packages/knip/src/ConfigurationChief.ts +++ b/packages/knip/src/ConfigurationChief.ts @@ -266,7 +266,7 @@ export class ConfigurationChief { const workspaces = this.manifest?.workspaces ? Array.isArray(this.manifest.workspaces) ? this.manifest.workspaces - : this.manifest.workspaces.packages ?? [] + : (this.manifest.workspaces.packages ?? []) : []; return workspaces.map(pattern => pattern.replace(/(?<=!?)\.\//, '')); } diff --git a/packages/knip/src/IssueFixer.ts b/packages/knip/src/IssueFixer.ts index b5138d008..e9d93779b 100644 --- a/packages/knip/src/IssueFixer.ts +++ b/packages/knip/src/IssueFixer.ts @@ -77,8 +77,8 @@ export class IssueFixer { const filePaths = new Set([...this.unusedTypeNodes.keys(), ...this.unusedExportNodes.keys()]); for (const filePath of filePaths) { const exportPositions: Fixes = [ - ...(this.isFixUnusedTypes ? this.unusedTypeNodes.get(filePath) ?? [] : []), - ...(this.isFixUnusedExports ? this.unusedExportNodes.get(filePath) ?? [] : []), + ...(this.isFixUnusedTypes ? (this.unusedTypeNodes.get(filePath) ?? []) : []), + ...(this.isFixUnusedExports ? (this.unusedExportNodes.get(filePath) ?? []) : []), ].sort((a, b) => b[0] - a[0]); if (exportPositions.length > 0) { diff --git a/packages/knip/src/util/to-source-path.ts b/packages/knip/src/util/to-source-path.ts index d135e6ccf..8e08df1c6 100644 --- a/packages/knip/src/util/to-source-path.ts +++ b/packages/knip/src/util/to-source-path.ts @@ -13,7 +13,7 @@ const matchExt = /(\.d)?\.(m|c)?(j|t)s$/; export const augmentWorkspace = (workspace: Workspace, dir: string, compilerOptions: CompilerOptions) => { const srcDir = join(dir, 'src'); - workspace.srcDir = compilerOptions.rootDir ?? isDirectory(srcDir) ? srcDir : dir; + workspace.srcDir = (compilerOptions.rootDir ?? isDirectory(srcDir)) ? srcDir : dir; workspace.outDir = compilerOptions.outDir || workspace.srcDir; };