Files
searxng/client/simple/biome.json
Ivan Gabaldon 60bd8b90f0 [enh] theme/simple: custom router
Lay the foundation for loading scripts granularly depending on the endpoint it's
on.

Remove vendor specific prefixes as there are now managed by browserslist and
LightningCSS.

Enabled quite a few rules in Biome that don't come in recommended to better
catch issues and improve consistency.

Related:

- https://github.com/searxng/searxng/pull/5073#discussion_r2256037965
- https://github.com/searxng/searxng/pull/5073#discussion_r2256057100
2025-08-18 16:38:32 +02:00

154 lines
4.2 KiB
JSON

{
"$schema": "https://biomejs.dev/schemas/2.1.3/schema.json",
"files": {
"includes": ["**", "!dist/**", "!node_modules/**"],
"ignoreUnknown": true
},
"vcs": {
"clientKind": "git",
"enabled": false,
"useIgnoreFile": true
},
"assist": {
"enabled": true,
"actions": {
"recommended": true
}
},
"formatter": {
"bracketSameLine": false,
"bracketSpacing": true,
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 120
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noForEach": "error",
"useSimplifiedLogicExpression": "error"
},
"correctness": {
"noUndeclaredVariables": {
"level": "error",
"options": {
"checkTypes": true
}
},
"useImportExtensions": "error"
},
"nursery": {
"noAwaitInLoop": "warn",
"noBitwiseOperators": "warn",
"noConstantBinaryExpression": "warn",
"noGlobalDirnameFilename": "warn",
"noImplicitCoercion": "warn",
"noMisusedPromises": "warn",
"noUnassignedVariables": "warn",
"noUselessBackrefInRegex": "warn",
"noUselessEscapeInString": "warn",
"noUselessUndefined": "warn",
"useAdjacentGetterSetter": "warn",
"useConsistentObjectDefinition": {
"level": "warn",
"options": {
"syntax": "explicit"
}
},
"useConsistentResponse": "warn",
"useExhaustiveSwitchCases": "warn",
"useExplicitType": "warn",
"useIndexOf": "warn",
"useIterableCallbackReturn": "warn",
"useJsonImportAttribute": "warn",
"useNumericSeparators": "warn",
"useObjectSpread": "warn",
"useParseIntRadix": "warn",
"useReadonlyClassProperties": "warn",
"useSingleJsDocAsterisk": "warn",
"useUnifiedTypeSignature": "warn"
},
"performance": {
"noBarrelFile": "error",
"noDelete": "error",
"noNamespaceImport": "error",
"noReExportAll": "error",
"useTopLevelRegex": "error"
},
"style": {
"noCommonJs": "error",
"noEnum": "error",
"noInferrableTypes": "error",
"noNamespace": "error",
"noNegationElse": "error",
"noNestedTernary": "error",
"noParameterAssign": "error",
"noParameterProperties": "error",
"noRestrictedTypes": {
"level": "error",
"options": {
"types": {
"Element": {
"message": "Element is too generic",
"use": "HTMLElement"
}
}
}
},
"noSubstr": "error",
"noUnusedTemplateLiteral": "error",
"noUselessElse": "error",
"noYodaExpression": "error",
"useAsConstAssertion": "error",
"useAtIndex": "error",
"useCollapsedElseIf": "error",
"useCollapsedIf": "error",
"useConsistentArrayType": {
"level": "error",
"options": {
"syntax": "shorthand"
}
},
"useConsistentBuiltinInstantiation": "error",
"useConsistentMemberAccessibility": {
"level": "error",
"options": {
"accessibility": "explicit"
}
},
"useDefaultSwitchClause": "error",
"useExplicitLengthCheck": "error",
"useForOf": "error",
"useNumberNamespace": "error",
"useShorthandAssign": "error",
"useSingleVarDeclarator": "error",
"useThrowNewError": "error",
"useThrowOnlyError": "error",
"useTrimStartEnd": "error"
},
"suspicious": {
"noAlert": "error",
"noEmptyBlockStatements": "error",
"noEvolvingTypes": "error",
"noVar": "error",
"useNumberToFixedDigitsArgument": "error"
}
}
},
"javascript": {
"formatter": {
"arrowParentheses": "always",
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"quoteStyle": "double",
"semicolons": "always",
"trailingCommas": "none"
}
}
}