Files
immich/web/biome.json
2025-06-13 14:21:29 +02:00

348 lines
9.9 KiB
JSON

{
"$schema": "https://biomejs.dev/schemas/2.0.0-beta.6/schema.json",
"assist": {
"actions": { "source": { "organizeImports": "on" } },
"enabled": true
},
"files": { "ignoreUnknown": false },
"formatter": { "enabled": true, "indentStyle": "tab" },
"javascript": { "formatter": { "quoteStyle": "double" }, "globals": [] },
"linter": {
"enabled": true,
"includes": [
"**",
"!**/.DS_Store",
"!**/node_modules",
"!build",
"!.svelte-kit",
"!package",
"!**/.env",
"!**/.env.*",
"**/.env.example",
"!**/pnpm-lock.yaml",
"!**/package-lock.json",
"!**/yarn.lock",
"!**/svelte.config.js",
"!eslint.config.js",
"!tailwind.config.js",
"!coverage",
"**",
"!**/.DS_Store",
"!**/node_modules",
"!build",
"!.svelte-kit",
"!package",
"!**/.env",
"!**/.env.*",
"**/.env.example",
"!**/pnpm-lock.yaml",
"!**/package-lock.json",
"!**/yarn.lock",
"!**/svelte.config.js",
"!eslint.config.js",
"!tailwind.config.js",
"!coverage"
],
"rules": {
"complexity": {
"noAdjacentSpacesInRegex": "error",
"noExtraBooleanCast": "error",
"noForEach": "error",
"noStaticOnlyClass": "error",
"noUselessCatch": "error",
"noUselessEscapeInRegex": "error",
"noUselessSwitchCase": "error",
"noUselessThisAlias": "error",
"noUselessTypeConstraint": "error",
"useDateNow": "error",
"useFlatMap": "error"
},
"correctness": {
"noConstAssign": "error",
"noConstantCondition": "error",
"noEmptyCharacterClassInRegex": "error",
"noEmptyPattern": "error",
"noGlobalObjectCalls": "error",
"noInvalidBuiltinInstantiation": "error",
"noInvalidConstructorSuper": "error",
"noNonoctalDecimalEscape": "error",
"noPrecisionLoss": "error",
"noSelfAssign": "error",
"noSetterReturn": "error",
"noSwitchDeclarations": "error",
"noUndeclaredVariables": "error",
"noUnreachable": "error",
"noUnreachableSuper": "error",
"noUnsafeFinally": "error",
"noUnsafeOptionalChaining": "error",
"noUnusedLabels": "error",
"noUnusedPrivateClassMembers": "error",
"noUnusedVariables": "off",
"useIsNan": "error",
"useValidForDirection": "error",
"useValidTypeof": "error",
"useYield": "error"
},
"recommended": false,
"style": {
"noCommonJs": "error",
"noNamespace": "error",
"noNegationElse": "off",
"noNestedTernary": "off",
"noSubstr": "error",
"useArrayLiterals": "error",
"useAsConstAssertion": "error",
"useAtIndex": "error",
"useCollapsedIf": "error",
"useExplicitLengthCheck": "error",
"useFilenamingConvention": {
"level": "error",
"options": { "filenameCases": ["kebab-case"] }
},
"useForOf": "error",
"useNodejsImportProtocol": "error",
"useNumberNamespace": "error",
"useThrowNewError": "error",
"useTrimStartEnd": "error"
},
"suspicious": {
"noAssignInExpressions": "error",
"noAsyncPromiseExecutor": "error",
"noCatchAssign": "error",
"noClassAssign": "error",
"noCompareNegZero": "error",
"noControlCharactersInRegex": "error",
"noDebugger": "error",
"noDocumentCookie": "error",
"noDuplicateCase": "error",
"noDuplicateClassMembers": "error",
"noDuplicateElseIf": "error",
"noDuplicateObjectKeys": "error",
"noDuplicateParameters": "error",
"noEmptyBlockStatements": "error",
"noExplicitAny": "error",
"noExtraNonNullAssertion": "error",
"noFallthroughSwitchClause": "error",
"noFunctionAssign": "error",
"noGlobalAssign": "error",
"noImportAssign": "error",
"noIrregularWhitespace": "error",
"noMisleadingCharacterClass": "error",
"noMisleadingInstantiator": "error",
"noPrototypeBuiltins": "error",
"noRedeclare": "error",
"noShadowRestrictedNames": "error",
"noSparseArray": "error",
"noThenProperty": "error",
"noUnsafeDeclarationMerging": "error",
"noUnsafeNegation": "error",
"noWith": "error",
"useErrorMessage": "error",
"useGetterReturn": "error",
"useNamespaceKeyword": "error",
"useNumberToFixedDigitsArgument": "error"
}
}
},
"overrides": [
{
"includes": ["*.svelte.js", "*.svelte.ts", "**/*.svelte.js", "**/*.svelte.ts"],
"javascript": { "globals": [] }
},
{
"includes": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
"linter": {
"rules": {
"complexity": { "noArguments": "error" },
"correctness": {
"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": ["**", "!**/service-worker/**"],
"javascript": {
"globals": [
"onanimationend",
"exports",
"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",
"onmouseenter",
"ongamepaddisconnected",
"onresize",
"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",
"NodeJS",
"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"
]
},
"linter": {
"rules": {
"correctness": { "noUnusedVariables": "warn" },
"style": {
"useBlockStatements": "error",
"useFilenamingConvention": {
"level": "off",
"options": { "filenameCases": ["kebab-case"] }
}
},
"suspicious": { "useAwait": "error" }
}
}
},
{
"includes": ["*.svelte", "**/*.svelte"],
"javascript": { "globals": [] },
"linter": {
"rules": {
"correctness": {
"noInnerDeclarations": "off",
"noSelfAssign": "off",
"noUnusedImports": "off",
"noUnusedVariables": "off"
}
}
}
}
],
"vcs": { "clientKind": "git", "enabled": false, "useIgnoreFile": false }
}