Add rules covering bug prevention (noLeakedRender, noFloatingPromises, noImportCycles, noReactForwardRef), security (noScriptUrl, noAlert), performance (noAwaitInLoops, useTopLevelRegex), and code style (noNestedTernary, useGlobalThis, useNullishCoalescing, useSortedClasses, plus ~40 more). Fix all violations: extract top-level regex constants, guard React && renders with boolean coercion, refactor nested ternaries, replace window with globalThis, sort Tailwind classes, and introduce expectDomainError test helper to eliminate conditional expects. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
130 lines
3.1 KiB
JSON
130 lines
3.1 KiB
JSON
{
|
|
"$schema": "https://biomejs.dev/schemas/2.4.7/schema.json",
|
|
"files": {
|
|
"includes": [
|
|
"**",
|
|
"!**/dist",
|
|
"!.claude",
|
|
"!.specify",
|
|
"!specs",
|
|
"!coverage",
|
|
"!.pnpm-store"
|
|
]
|
|
},
|
|
"assist": {
|
|
"enabled": true,
|
|
"actions": {
|
|
"source": {
|
|
"organizeImports": {
|
|
"level": "on"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"css": {
|
|
"parser": {
|
|
"cssModules": false,
|
|
"tailwindDirectives": true
|
|
}
|
|
},
|
|
"formatter": {
|
|
"enabled": true,
|
|
"indentStyle": "tab",
|
|
"lineWidth": 80
|
|
},
|
|
"linter": {
|
|
"enabled": true,
|
|
"rules": {
|
|
"recommended": true,
|
|
"a11y": {
|
|
"noNoninteractiveElementInteractions": "error"
|
|
},
|
|
"complexity": {
|
|
"noExcessiveCognitiveComplexity": {
|
|
"level": "error",
|
|
"options": {
|
|
"maxAllowedComplexity": 15
|
|
}
|
|
},
|
|
"noUselessStringConcat": "error"
|
|
},
|
|
"correctness": {
|
|
"noNestedComponentDefinitions": "error",
|
|
"noReactPropAssignments": "error"
|
|
},
|
|
"nursery": {
|
|
"noConditionalExpect": "error",
|
|
"noDuplicatedSpreadProps": "error",
|
|
"noFloatingPromises": "error",
|
|
"noLeakedRender": "error",
|
|
"noMisusedPromises": "error",
|
|
"noNestedPromises": "error",
|
|
"noReturnAssign": "error",
|
|
"noScriptUrl": "error",
|
|
"noShadow": "error",
|
|
"noUnnecessaryConditions": "error",
|
|
"noUselessReturn": "error",
|
|
"useArraySome": "error",
|
|
"useArraySortCompare": "error",
|
|
"useAwaitThenable": "error",
|
|
"useErrorCause": "error",
|
|
"useExhaustiveSwitchCases": "error",
|
|
"useFind": "error",
|
|
"useGlobalThis": "error",
|
|
"useNullishCoalescing": "error",
|
|
"useRegexpExec": "error",
|
|
"useSortedClasses": "error",
|
|
"useSpread": "error"
|
|
},
|
|
"performance": {
|
|
"noAwaitInLoops": "error",
|
|
"useTopLevelRegex": "error"
|
|
},
|
|
"style": {
|
|
"noCommonJs": "error",
|
|
"noDoneCallback": "error",
|
|
"noExportedImports": "error",
|
|
"noInferrableTypes": "error",
|
|
"noNamespace": "error",
|
|
"noNegationElse": "error",
|
|
"noNestedTernary": "error",
|
|
"noParameterAssign": "error",
|
|
"noSubstr": "error",
|
|
"noUnusedTemplateLiteral": "error",
|
|
"noUselessElse": "error",
|
|
"noYodaExpression": "error",
|
|
"useAsConstAssertion": "error",
|
|
"useAtIndex": "error",
|
|
"useCollapsedElseIf": "error",
|
|
"useCollapsedIf": "error",
|
|
"useConsistentBuiltinInstantiation": "error",
|
|
"useDefaultParameterLast": "error",
|
|
"useExplicitLengthCheck": "error",
|
|
"useForOf": "error",
|
|
"useFragmentSyntax": "error",
|
|
"useNumberNamespace": "error",
|
|
"useSelfClosingElements": "error",
|
|
"useShorthandAssign": "error",
|
|
"useThrowNewError": "error",
|
|
"useThrowOnlyError": "error",
|
|
"useTrimStartEnd": "error"
|
|
},
|
|
"suspicious": {
|
|
"noAlert": "error",
|
|
"noConstantBinaryExpressions": "error",
|
|
"noDeprecatedImports": "error",
|
|
"noEvolvingTypes": "error",
|
|
"noImportCycles": "error",
|
|
"noReactForwardRef": "error",
|
|
"noSkippedTests": "error",
|
|
"noTemplateCurlyInString": "error",
|
|
"noTsIgnore": "error",
|
|
"noUnusedExpressions": "error",
|
|
"noVar": "error",
|
|
"useAwait": "error",
|
|
"useErrorMessage": "error"
|
|
}
|
|
}
|
|
}
|
|
}
|