spawn/cli/biome.json
A 61fc36c557
refactor: enforce isString/isNumber type guards via GritQL lint rule (#1796)
Add `lint/no-typeof-string-number.grit` plugin that bans raw
`typeof x === "string"` and `typeof x === "number"` checks. All
occurrences replaced with `isString(x)` / `isNumber(x)` from
`shared/type-guards.ts`.

This makes narrowing patterns consistent and scannable — every
type check uses the same vocabulary project-wide.

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-23 03:20:42 -05:00

104 lines
2.7 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
}
},
"plugins": ["./lint/no-type-assertion.grit", "./lint/no-typeof-string-number.grit"],
"assist": {
"enabled": false
}
}