Skip to content

Commit

Permalink
fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
AugustinMauroy committed Nov 15, 2024
1 parent 33802a8 commit 11ec4cc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
17 changes: 13 additions & 4 deletions biome.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -41,8 +41,7 @@
"useSortedClasses": "error",
"noCommonJs": "error",
"noEnum": "error",
"noUnknownTypeSelector": "error",
"noDescendingSpecificity": "error"
"noUnknownTypeSelector": "error"
},
"recommended": false,
"complexity": {
Expand All @@ -69,7 +68,8 @@
"noUnsafeDeclarationMerging": "error",
"useNamespaceKeyword": "error",
"noEmptyBlock": "error",
"noDuplicateAtImportRules": "error"
"noDuplicateAtImportRules": "error",
"noDuplicateObjectKeys": "error"
}
}
},
Expand Down Expand Up @@ -139,5 +139,14 @@
"parser": {
"cssModules": true
}
},
"json": {
"formatter": {
"enabled": true,
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"indentStyle": "space"
}
}
}
4 changes: 3 additions & 1 deletion components/Common/Codebox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const Codebox: FC<CodeboxProps> = 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',
Expand Down

0 comments on commit 11ec4cc

Please sign in to comment.