ai-chatbot/biome.jsonc
2026-05-26 19:32:19 +08:00

213 lines
7.1 KiB
JSON

{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["ultracite"],
"assist": {
"enabled": false
},
"files": {
"includes": [
"**/*",
"!components/ui",
"!lib/utils.ts",
"!hooks/use-mobile.ts",
"!lib/db/migrations/meta",
"!public/vendor",
"!public/three",
"!vercel.json"
]
},
"formatter": {
"enabled": false
},
"linter": {
"rules": {
"suspicious": {
/* Needs more work to fix */
"noExplicitAny": "off",
/* Some legacy routes/stores still rely on inferred variables and callback returns */
"noAssignInExpressions": "off",
"noControlCharactersInRegex": "off",
"noDoubleEquals": "off",
"noGlobalIsFinite": "off",
"noGlobalIsNan": "off",
"noMisleadingCharacterClass": "off",
"noUselessEscapeInString": "off",
"noImplicitAnyLet": "off",
"noPrototypeBuiltins": "off",
"noRedeclare": "off",
"useAwait": "off",
"useIterableCallbackReturn": "off",
/* Legacy code uses intentional empty catch/fallback blocks in several async cleanups */
"noEmptyBlockStatements": "off",
/* Large legacy routes still need explicit array typing before this can be enabled globally */
"noEvolvingTypes": "off",
/* React skeletons and fixed placeholder rows still use index keys */
"noArrayIndexKey": "off",
/* Allow for Tailwind @ rules */
"noUnknownAtRules": "off",
/* Allowing console for debugging */
"noConsole": "off",
/* Needed for generateUUID() */
"noBitwiseOperators": "off"
},
"style": {
/* Legacy script filenames are not normalized yet */
"useFilenamingConvention": "off",
/* Stylistic rewrites are not part of this gate restoration phase */
"useAtIndex": "off",
"noNegationElse": "off",
/* Legacy code frequently uses compact guard clauses */
"useBlockStatements": "off",
"useCollapsedElseIf": "off",
"useCollapsedIf": "off",
"useDefaultSwitchClause": "off",
"noUselessElse": "off",
/* Existing public types use both Array<T> and T[] */
"useConsistentArrayType": "off",
/* Allowing magic numbers */
"noMagicNumbers": "off",
/* Type declaration shims may need namespaces for third-party modules */
"noExportedImports": "off",
"noNamespace": "off",
"noParameterProperties": "off",
/* Non-null assertions require a dedicated nullability hardening pass */
"noNonNullAssertion": "off",
/* Template migration is stylistic and too broad for this gate-restoration pass */
"useForOf": "off",
"useReadonlyClassProperties": "off",
"useNodejsImportProtocol": "off",
"useImportType": "off",
"useNumericSeparators": "off",
"useSelfClosingElements": "off",
"useTemplate": "off",
"useThrowOnlyError": "off",
"noInferrableTypes": "off",
"noUnusedTemplateLiteral": "off",
"useConsistentObjectDefinitions": "off",
"useConst": "off",
"useExponentiationOperator": "off",
"useNumberNamespace": "off",
/* Needs more work to fix */
"noNestedTernary": "off"
},
"nursery": {
/* Migrating every exported interface to type aliases is too broad for this phase */
"useConsistentTypeDefinitions": "off",
/* Too many false positives */
"useMaxParams": "off",
"noShadow": "off",
"useSortedClasses": "off",
"noUselessUndefined": "off",
"noUnnecessaryConditions": "off",
"useReactFunctionComponents": "off",
"useImageSize": "off"
},
"complexity": {
/* Needs more work to fix */
"noExcessiveCognitiveComplexity": "off",
/* Legacy code intentionally uses fire-and-forget promises */
"noVoid": "off",
/* Avoid broad churn across state stores and route handlers in this phase */
"noForEach": "off",
"noUselessTernary": "off",
"noUselessUndefinedInitialization": "off",
"noUselessSwitchCase": "off",
"noUselessFragments": "off",
"noExtraBooleanCast": "off",
"noUselessContinue": "off",
"noUselessEscapeInRegex": "off",
"noUselessStringConcat": "off",
"useFlatMap": "off",
/* This one has false positives. It's a bit... iffy 😉 */
"useIndexOf": "off",
"useLiteralKeys": "off",
"useOptionalChain": "off",
"useSimplifiedLogicExpression": "off"
},
"performance": {
/* Node scripts commonly use namespace imports for package entrypoints */
"noNamespaceImport": "off",
/* Some image sources are dynamic/admin controlled and need a dedicated Next Image pass */
"noImgElement": "off",
/* Existing auth/session code uses delete intentionally */
"noDelete": "off",
/* Top-level regex extraction is useful but too broad for the current cleanup phase */
"useTopLevelRegex": "off",
/* Route handler re-exports keep NextAuth wiring simple and type-safe */
"noBarrelFile": "off"
},
"correctness": {
/* Existing unreachable placeholder branches need a focused cleanup */
"noInnerDeclarations": "off",
"noUnreachable": "off",
/* Existing conditional hook warning needs a component-level refactor, not a gate fix */
"useHookAtTopLevel": "off",
/* Existing effects need a dedicated React hooks audit */
"useExhaustiveDependencies": "off",
/* Cleanup import debt separately from this gate-restoration pass */
"noUnusedImports": "off",
"noUnusedVariables": "off",
/* Add radix incrementally where logic is touched instead of broad churn */
"useParseIntRadix": "off",
/* Unused request params are required by some Next.js route handler signatures */
"noUnusedFunctionParameters": "off"
},
"a11y": {
/* Existing media/image/link semantics need a dedicated accessibility pass */
"noRedundantAlt": "off",
"useAltText": "off",
"useAriaPropsSupportedByRole": "off",
"useIframeTitle": "off",
"useValidAnchor": "off",
/* Custom switch/label patterns need a dedicated accessibility pass */
"noLabelWithoutControl": "off",
/* Button type and semantic role cleanup need a dedicated accessibility pass */
"useMediaCaption": "off",
"useButtonType": "off",
"useSemanticElements": "off",
/* Existing selectable card patterns need a dedicated accessibility pass */
"noNoninteractiveElementInteractions": "off",
"noStaticElementInteractions": "off",
/* Needs more work to fix */
"noSvgWithoutTitle": "off",
"useKeyWithClickEvents": "off"
},
"security": {
/* Existing inline style injection needs a dedicated security review */
"noDangerouslySetInnerHtml": "off"
}
}
}
}