From 11ec4cc2c3bc0ff48bfd4b2948684386b949e222 Mon Sep 17 00:00:00 2001 From: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com> Date: Fri, 15 Nov 2024 12:23:05 +0100 Subject: [PATCH] fix code style --- biome.json | 17 +++++++++++++---- components/Common/Codebox/index.tsx | 4 +++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/biome.json b/biome.json index f60a130..ea46499 100644 --- a/biome.json +++ b/biome.json @@ -1,7 +1,7 @@ { "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", "files": { - "include": ["**/*.{ts,tsx,js,jsx,mts,cts,css}"], + "include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.css", "**/*.json"], "ignore": [ "./node_modules", "./.pnp", @@ -41,8 +41,7 @@ "useSortedClasses": "error", "noCommonJs": "error", "noEnum": "error", - "noUnknownTypeSelector": "error", - "noDescendingSpecificity": "error" + "noUnknownTypeSelector": "error" }, "recommended": false, "complexity": { @@ -69,7 +68,8 @@ "noUnsafeDeclarationMerging": "error", "useNamespaceKeyword": "error", "noEmptyBlock": "error", - "noDuplicateAtImportRules": "error" + "noDuplicateAtImportRules": "error", + "noDuplicateObjectKeys": "error" } } }, @@ -139,5 +139,14 @@ "parser": { "cssModules": true } + }, + "json": { + "formatter": { + "enabled": true, + "indentWidth": 2, + "lineEnding": "lf", + "lineWidth": 80, + "indentStyle": "space" + } } } diff --git a/components/Common/Codebox/index.tsx b/components/Common/Codebox/index.tsx index 7db22b7..0ea1d85 100644 --- a/components/Common/Codebox/index.tsx +++ b/components/Common/Codebox/index.tsx @@ -15,7 +15,9 @@ const Codebox: FC = async props => { if (!isValidElement(props.children)) return null; const code = props.children.props.children.trim(); - const lang = props.children.props.className.replace('language-', '').replace('mjs', 'js'); + const lang = props.children.props.className + .replace('language-', '') + .replace('mjs', 'js'); const html = await codeToHtml(code, { theme: 'vitesse-light',