spawn/cli/biome.json
A fdd6a9b6c3
chore: harden biome lint rules and auto-fix codebase (#1759)
* chore: harden biome lint rules and auto-fix codebase

Add strict biome rules for better TypeScript code quality:
- useBlockStatements: enforce braces on all control flow
- useConst: prefer const over let
- useNodejsImportProtocol: require node: prefix for builtins
- noUnusedImports/Variables: error (warn in tests)
- noExplicitAny: warn in source, off in tests
- noDoubleEquals, noAssignInExpressions, noFallthroughSwitchClause
- useNumberNamespace (Number.isNaN over isNaN)
- noImplicitAnyLet, noInferrableTypes, noUselessElse

Auto-fixed 55 files. Tests relaxed for any/unused patterns.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: enable biome formatter with expand: always for brace newlines

Enable biome formatter with:
- expand: "always" — braces on their own lines
- indentStyle: space, indentWidth: 2
- lineWidth: 120
- arrowParentheses: always
- trailingCommas: all
- semicolons: always

82 files reformatted. All 1819 tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-22 14:37:47 -08:00

103 lines
2.6 KiB
JSON

{
"$schema": "https://biomejs.dev/schemas/2.4.3/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "main"
},
"files": {
"ignoreUnknown": false,
"includes": ["src/**/*.ts"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 120
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"useLiteralKeys": "off",
"noForEach": "off",
"noUselessSwitchCase": "off"
},
"style": {
"noNonNullAssertion": "off",
"useNodejsImportProtocol": "error",
"useTemplate": "off",
"useBlockStatements": "error",
"noParameterAssign": "off",
"useConst": "error",
"useDefaultParameterLast": "error",
"useSelfClosingElements": "error",
"useSingleVarDeclarator": "error",
"noUnusedTemplateLiteral": "error",
"useNumberNamespace": "error",
"noInferrableTypes": "error",
"noUselessElse": "error",
"useImportType": "error"
},
"correctness": {
"noUnusedImports": "error",
"noUnusedVariables": "error",
"noUnusedFunctionParameters": "warn",
"noInnerDeclarations": "error"
},
"suspicious": {
"noExplicitAny": "warn",
"noAssignInExpressions": "error",
"noFallthroughSwitchClause": "error",
"noDoubleEquals": "error",
"noExtraNonNullAssertion": "error",
"noTemplateCurlyInString": "off",
"noImplicitAnyLet": "error",
"noGlobalIsNan": "error",
"noGlobalIsFinite": "error",
"noControlCharactersInRegex": "off"
},
"performance": {
"recommended": true,
"noAccumulatingSpread": "error"
},
"security": {
"recommended": true
}
}
},
"overrides": [
{
"includes": ["src/__tests__/**"],
"linter": {
"rules": {
"suspicious": {
"noExplicitAny": "off",
"noImplicitAnyLet": "off",
"noAssignInExpressions": "off"
},
"correctness": {
"noUnusedVariables": "off",
"noUnusedFunctionParameters": "off"
}
}
}
}
],
"javascript": {
"formatter": {
"expand": "always",
"arrowParentheses": "always",
"quoteStyle": "double",
"trailingCommas": "all",
"semicolons": "always",
"bracketSpacing": true,
"bracketSameLine": false
}
},
"assist": {
"enabled": false
}
}