frontend/biome.json
Rama main · réplica de lectura del repositorio original.
{
"$schema": "https://biomejs.dev/schemas/2.6.4/schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"files": {
"ignoreUnknown": true,
"includes": [
"src/**/*",
"!src/**/*.test.tsx",
"!**/*.svg",
"!!src/bbkit/BBUtil.ts",
"!!src/types/proto-es/**"
]
},
"plugins": ["./biome-plugins/no-crypto-randomuuid.grit"],
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 80
},
"css": {
"parser": {
"cssModules": false,
"tailwindDirectives": true
}
},
"linter": {
"enabled": true,
"rules": {
"preset": "none",
"complexity": {
"noUselessCatchBinding": "error",
"noUselessEscapeInRegex": "error",
"noUselessTypeConstraint": "error",
"useArrayFind": "error"
},
"correctness": {
"noConstantCondition": "error",
"noEmptyPattern": "error",
"noPrecisionLoss": "error",
"noSelfAssign": "error",
"noUnsafeOptionalChaining": "error",
"noUnusedVariables": "error",
"useIsNan": "error",
"useValidForDirection": "error"
},
"style": {
"noCommonJs": "error",
"noNamespace": "error",
"noRestrictedImports": {
"level": "error",
"options": {
"paths": {
"vue": "The frontend is React-only; do not reintroduce Vue."
}
}
},
"useArrayLiterals": "error",
"useAsConstAssertion": "error",
"useBlockStatements": "off",
"useExportType": "error",
"useSelfClosingElements": "error",
"useSpreadOverApply": "error"
},
"suspicious": {
"noAsyncPromiseExecutor": "error",
"noConsole": {
"level": "error",
"options": { "allow": ["warn", "error", "debug", "assert"] }
},
"noDebugger": "error",
"noDeprecatedImports": "error",
"noDoubleEquals": "error",
"noDuplicateCase": "error",
"noEmptyInterface": "error",
"noExplicitAny": "error",
"noExtraNonNullAssertion": "error",
"noGlobalIsNan": "error",
"noMisleadingInstantiator": "error",
"noNonNullAssertedOptionalChain": "error",
"noSparseArray": "error",
"noUnsafeDeclarationMerging": "error",
"useNamespaceKeyword": "error",
"noForIn": "error",
"useArraySortCompare": "error"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"trailingCommas": "es5"
},
"globals": [
"onanimationend",
"ongamepadconnected",
"onlostpointercapture",
"onanimationiteration",
"onkeyup",
"onmousedown",
"onanimationstart",
"onslotchange",
"onprogress",
"ontransitionstart",
"onpause",
"onended",
"onpointerover",
"onscrollend",
"onformdata",
"ontransitionrun",
"onanimationcancel",
"ondrag",
"onchange",
"onbeforeinstallprompt",
"onbeforexrselect",
"onmessage",
"ontransitioncancel",
"onpointerdown",
"onabort",
"onpointerout",
"oncuechange",
"ongotpointercapture",
"onscrollsnapchanging",
"onsearch",
"onsubmit",
"onstalled",
"onsuspend",
"onreset",
"onerror",
"onresize",
"onmouseenter",
"ongamepaddisconnected",
"ondragover",
"onbeforetoggle",
"onmouseover",
"onpagehide",
"onmousemove",
"onratechange",
"oncommand",
"onmessageerror",
"onwheel",
"ondevicemotion",
"onauxclick",
"ontransitionend",
"onpaste",
"onpageswap",
"ononline",
"ondeviceorientationabsolute",
"onkeydown",
"onclose",
"onselect",
"onpageshow",
"onpointercancel",
"onbeforematch",
"onpointerrawupdate",
"ondragleave",
"onscrollsnapchange",
"onseeked",
"onwaiting",
"onbeforeunload",
"onplaying",
"onvolumechange",
"ondragend",
"onstorage",
"onloadeddata",
"onfocus",
"onoffline",
"onplay",
"onafterprint",
"onclick",
"oncut",
"onmouseout",
"ondblclick",
"oncanplay",
"onloadstart",
"onappinstalled",
"onpointermove",
"ontoggle",
"oncontextmenu",
"onblur",
"oncancel",
"onbeforeprint",
"oncontextrestored",
"onloadedmetadata",
"onpointerup",
"onlanguagechange",
"oncopy",
"onselectstart",
"onscroll",
"onload",
"ondragstart",
"onbeforeinput",
"oncanplaythrough",
"oninput",
"oninvalid",
"ontimeupdate",
"ondurationchange",
"onselectionchange",
"onmouseup",
"location",
"onkeypress",
"onpointerleave",
"oncontextlost",
"ondrop",
"onsecuritypolicyviolation",
"oncontentvisibilityautostatechange",
"ondeviceorientation",
"onseeking",
"onrejectionhandled",
"onunload",
"onmouseleave",
"onhashchange",
"onpointerenter",
"onmousewheel",
"onunhandledrejection",
"ondragenter",
"onpopstate",
"onpagereveal",
"onemptied"
]
},
"overrides": [
{
"includes": ["tailwind.config.js", "vite-plugin-export-csp-hashes.ts"],
"formatter": { "enabled": false },
"linter": { "enabled": false }
},
{
"includes": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
"linter": {
"rules": {
"complexity": { "noArguments": "error" },
"correctness": {
"noUnusedImports": "error",
"noConstAssign": "off",
"noGlobalObjectCalls": "off",
"noInvalidBuiltinInstantiation": "off",
"noInvalidConstructorSuper": "off",
"noSetterReturn": "off",
"noUndeclaredVariables": "off",
"noUnreachable": "off",
"noUnreachableSuper": "off"
},
"style": { "useConst": "error" },
"suspicious": {
"noClassAssign": "off",
"noDuplicateClassMembers": "off",
"noDuplicateObjectKeys": "off",
"noDuplicateParameters": "off",
"noFunctionAssign": "off",
"noImportAssign": "off",
"noRedeclare": "off",
"noUnsafeNegation": "off",
"noVar": "error",
"noWith": "off",
"useGetterReturn": "off"
}
}
}
},
{
"includes": ["**/index.ts"],
"assist": {
"enabled": false
}
},
{
"includes": [
"src/api/**",
"src/components/**",
"src/hooks/**",
"src/lib/**",
"src/modules/**",
"src/stores/**"
],
"linter": {
"rules": {
"style": {
"noRestrictedImports": {
"level": "error",
"options": {
"paths": {
"vue": "The frontend is React-only; do not reintroduce Vue."
},
"patterns": [
{
"group": ["@/routes/**"],
"message": "Shared code must not import from src/routes; move the code to its shared owner."
}
]
}
}
}
}
}
},
{
"includes": [
"src/**/*.ts",
"src/**/*.tsx",
"!src/**/*.test.ts",
"!src/**/*.test.tsx"
],
"plugins": ["./biome-plugins/cel-filter-literals.grit"]
},
{
"includes": [
"src/**/*.ts",
"src/**/*.tsx",
"!src/**/*.test.ts",
"!src/**/*.test.tsx",
"!src/utils/datetime.ts",
"!src/utils/accessGrant.ts",
"!src/hooks/useTimeReading.ts"
],
"plugins": ["./biome-plugins/time-reading-through-hook.grit"]
},
{
"includes": ["*.json", "**/*.json", "*.json5", "**/*.json5"],
"javascript": { "globals": [] },
"linter": {
"rules": {
"suspicious": {
"noDuplicateObjectKeys": "error"
}
}
}
},
{
"includes": ["*.yaml", "**/*.yaml", "*.yml", "**/*.yml"],
"javascript": { "globals": [] },
"linter": {
"rules": { "suspicious": { "noIrregularWhitespace": "off" } }
}
}
],
"assist": {
"enabled": true
}
}