From 894fcc410efc0b218757d5041fca7ac91ce527bf Mon Sep 17 00:00:00 2001 From: McKayla Washburn Date: Thu, 14 Aug 2025 22:27:02 +0000 Subject: [PATCH] chore: fix biome when running locally --- biome.jsonc | 86 +++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + pnpm-lock.yaml | 91 ++++++++++++++++++++++++++++++++++++++++++++++++ site/biome.jsonc | 73 ++------------------------------------ 4 files changed, 180 insertions(+), 71 deletions(-) create mode 100644 biome.jsonc diff --git a/biome.jsonc b/biome.jsonc new file mode 100644 index 0000000000000..ae81184cdca0c --- /dev/null +++ b/biome.jsonc @@ -0,0 +1,86 @@ +{ + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true, + "defaultBranch": "main" + }, + "files": { + "includes": [ + "**", + "!**/pnpm-lock.yaml" + ], + "ignoreUnknown": true + }, + "linter": { + "rules": { + "a11y": { + "noSvgWithoutTitle": "off", + "useButtonType": "off", + "useSemanticElements": "off", + "noStaticElementInteractions": "off" + }, + "correctness": { + "noUnusedImports": "warn", + "useUniqueElementIds": "off", // TODO: This is new but we want to fix it + "noNestedComponentDefinitions": "off", // TODO: Investigate, since it is used by shadcn components + "noUnusedVariables": { + "level": "warn", + "options": { + "ignoreRestSiblings": true + } + } + }, + "style": { + "noNonNullAssertion": "off", + "noParameterAssign": "off", + "useDefaultParameterLast": "off", + "useSelfClosingElements": "off", + "useAsConstAssertion": "error", + "useEnumInitializers": "error", + "useSingleVarDeclarator": "error", + "noUnusedTemplateLiteral": "error", + "useNumberNamespace": "error", + "noInferrableTypes": "error", + "noUselessElse": "error", + "noRestrictedImports": { + "level": "error", + "options": { + "paths": { + "@mui/material": "Use @mui/material/ instead. See: https://material-ui.com/guides/minimizing-bundle-size/.", + "@mui/icons-material": "Use @mui/icons-material/ instead. See: https://material-ui.com/guides/minimizing-bundle-size/.", + "@mui/material/Avatar": "Use components/Avatar/Avatar instead.", + "@mui/material/Alert": "Use components/Alert/Alert instead.", + "@mui/material/Popover": "Use components/Popover/Popover instead.", + "@mui/material/Typography": "Use native HTML elements instead. Eg: ,

,

, etc.", + "@mui/material/Box": "Use a
instead.", + "@mui/material/styles": "Import from @emotion/react instead.", + "lodash": "Use lodash/ instead." + } + } + } + }, + "suspicious": { + "noArrayIndexKey": "off", + "noThenProperty": "off", + "noTemplateCurlyInString": "off", + "useIterableCallbackReturn": "off", + "noUnknownAtRules": "off", // Allow Tailwind directives + "noConsole": { + "level": "error", + "options": { + "allow": [ + "error", + "info", + "warn" + ] + } + } + }, + "complexity": { + "noImportantStyles": "off" // TODO: check and fix !important styles + } + } + }, + "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json" +} diff --git a/package.json b/package.json index 7206b88fe6222..f8ab3fa89170b 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "storybook": "pnpm run -C site/ storybook" }, "devDependencies": { + "@biomejs/biome": "2.2.0", "markdown-table-formatter": "^1.6.1", "markdownlint-cli2": "^0.16.0", "quicktype": "^23.0.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c136ad0acdcbf..4e6996283b064 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: devDependencies: + '@biomejs/biome': + specifier: 2.2.0 + version: 2.2.0 markdown-table-formatter: specifier: ^1.6.1 version: 1.6.1 @@ -20,6 +23,59 @@ importers: packages: + '@biomejs/biome@2.2.0': + resolution: {integrity: sha512-3On3RSYLsX+n9KnoSgfoYlckYBoU6VRM22cw1gB4Y0OuUVSYd/O/2saOJMrA4HFfA1Ff0eacOvMN1yAAvHtzIw==} + engines: {node: '>=14.21.3'} + hasBin: true + + '@biomejs/cli-darwin-arm64@2.2.0': + resolution: {integrity: sha512-zKbwUUh+9uFmWfS8IFxmVD6XwqFcENjZvEyfOxHs1epjdH3wyyMQG80FGDsmauPwS2r5kXdEM0v/+dTIA9FXAg==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [darwin] + + '@biomejs/cli-darwin-x64@2.2.0': + resolution: {integrity: sha512-+OmT4dsX2eTfhD5crUOPw3RPhaR+SKVspvGVmSdZ9y9O/AgL8pla6T4hOn1q+VAFBHuHhsdxDRJgFCSC7RaMOw==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [darwin] + + '@biomejs/cli-linux-arm64-musl@2.2.0': + resolution: {integrity: sha512-egKpOa+4FL9YO+SMUMLUvf543cprjevNc3CAgDNFLcjknuNMcZ0GLJYa3EGTCR2xIkIUJDVneBV3O9OcIlCEZQ==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-arm64@2.2.0': + resolution: {integrity: sha512-6eoRdF2yW5FnW9Lpeivh7Mayhq0KDdaDMYOJnH9aT02KuSIX5V1HmWJCQQPwIQbhDh68Zrcpl8inRlTEan0SXw==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-x64-musl@2.2.0': + resolution: {integrity: sha512-I5J85yWwUWpgJyC1CcytNSGusu2p9HjDnOPAFG4Y515hwRD0jpR9sT9/T1cKHtuCvEQ/sBvx+6zhz9l9wEJGAg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-linux-x64@2.2.0': + resolution: {integrity: sha512-5UmQx/OZAfJfi25zAnAGHUMuOd+LOsliIt119x2soA2gLggQYrVPA+2kMUxR6Mw5M1deUF/AWWP2qpxgH7Nyfw==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-win32-arm64@2.2.0': + resolution: {integrity: sha512-n9a1/f2CwIDmNMNkFs+JI0ZjFnMO0jdOyGNtihgUNFnlmd84yIYY2KMTBmMV58ZlVHjgmY5Y6E1hVTnSRieggA==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [win32] + + '@biomejs/cli-win32-x64@2.2.0': + resolution: {integrity: sha512-Nawu5nHjP/zPKTIryh2AavzTc/KEg4um/MxWdXW0A6P/RZOyIpa7+QSjeXwAwX/utJGaCoXRPWtF3m5U/bB3Ww==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [win32] + '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} @@ -722,6 +778,41 @@ packages: snapshots: + '@biomejs/biome@2.2.0': + optionalDependencies: + '@biomejs/cli-darwin-arm64': 2.2.0 + '@biomejs/cli-darwin-x64': 2.2.0 + '@biomejs/cli-linux-arm64': 2.2.0 + '@biomejs/cli-linux-arm64-musl': 2.2.0 + '@biomejs/cli-linux-x64': 2.2.0 + '@biomejs/cli-linux-x64-musl': 2.2.0 + '@biomejs/cli-win32-arm64': 2.2.0 + '@biomejs/cli-win32-x64': 2.2.0 + + '@biomejs/cli-darwin-arm64@2.2.0': + optional: true + + '@biomejs/cli-darwin-x64@2.2.0': + optional: true + + '@biomejs/cli-linux-arm64-musl@2.2.0': + optional: true + + '@biomejs/cli-linux-arm64@2.2.0': + optional: true + + '@biomejs/cli-linux-x64-musl@2.2.0': + optional: true + + '@biomejs/cli-linux-x64@2.2.0': + optional: true + + '@biomejs/cli-win32-arm64@2.2.0': + optional: true + + '@biomejs/cli-win32-x64@2.2.0': + optional: true + '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 diff --git a/site/biome.jsonc b/site/biome.jsonc index 9bb011fba8b2d..4c9cb18aa482b 100644 --- a/site/biome.jsonc +++ b/site/biome.jsonc @@ -1,76 +1,7 @@ { - "vcs": { - "enabled": true, - "clientKind": "git", - "root": ".." - }, + "extends": "//", "files": { - "includes": ["**", "!**/e2e/**/*Generated.ts", "!**/pnpm-lock.yaml"], - "ignoreUnknown": true - }, - "linter": { - "rules": { - "a11y": { - "noSvgWithoutTitle": "off", - "useButtonType": "off", - "useSemanticElements": "off", - "noStaticElementInteractions": "off" - }, - "correctness": { - "noUnusedImports": "warn", - "useUniqueElementIds": "off", // TODO: This is new but we want to fix it - "noNestedComponentDefinitions": "off", // TODO: Investigate, since it is used by shadcn components - "noUnusedVariables": { - "level": "warn", - "options": { - "ignoreRestSiblings": true - } - } - }, - "style": { - "noNonNullAssertion": "off", - "noParameterAssign": "off", - "useDefaultParameterLast": "off", - "useSelfClosingElements": "off", - "useAsConstAssertion": "error", - "useEnumInitializers": "error", - "useSingleVarDeclarator": "error", - "noUnusedTemplateLiteral": "error", - "useNumberNamespace": "error", - "noInferrableTypes": "error", - "noUselessElse": "error", - "noRestrictedImports": { - "level": "error", - "options": { - "paths": { - "@mui/material": "Use @mui/material/ instead. See: https://material-ui.com/guides/minimizing-bundle-size/.", - "@mui/icons-material": "Use @mui/icons-material/ instead. See: https://material-ui.com/guides/minimizing-bundle-size/.", - "@mui/material/Avatar": "Use components/Avatar/Avatar instead.", - "@mui/material/Alert": "Use components/Alert/Alert instead.", - "@mui/material/Popover": "Use components/Popover/Popover instead.", - "@mui/material/Typography": "Use native HTML elements instead. Eg: ,

,

, etc.", - "@mui/material/Box": "Use a
instead.", - "@mui/material/styles": "Import from @emotion/react instead.", - "lodash": "Use lodash/ instead." - } - } - } - }, - "suspicious": { - "noArrayIndexKey": "off", - "noThenProperty": "off", - "noTemplateCurlyInString": "off", - "useIterableCallbackReturn": "off", - "noUnknownAtRules": "off", // Allow Tailwind directives - "noConsole": { - "level": "error", - "options": { "allow": ["error", "info", "warn"] } - } - }, - "complexity": { - "noImportantStyles": "off" // TODO: check and fix !important styles - } - } + "includes": ["!e2e/**/*Generated.ts"] }, "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json" } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy