@suin/biome.json
Version:
Opinionated Biome configuration extending ultracite with additional rules
466 lines • 15.7 kB
JSON
{
"$schema": "../node_modules/@biomejs/biome/configuration_schema.json",
"formatter": {
"enabled": true,
"formatWithErrors": true,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"attributePosition": "auto",
"bracketSpacing": true
},
"assist": {
"actions": {
"source": {
"organizeImports": "on",
"useSortedAttributes": "on",
"useSortedKeys": "off"
}
}
},
"linter": {
"enabled": true,
"rules": {
"a11y": {
"noAccessKey": "warn",
"noAriaHiddenOnFocusable": "warn",
"noAriaUnsupportedElements": "warn",
"noDistractingElements": "warn",
"noHeaderScope": "warn",
"noInteractiveElementToNoninteractiveRole": "warn",
"noLabelWithoutControl": "warn",
"noNoninteractiveElementInteractions": "warn",
"noNoninteractiveElementToInteractiveRole": "warn",
"noNoninteractiveTabindex": "warn",
"noPositiveTabindex": "warn",
"noRedundantAlt": "warn",
"noRedundantRoles": "warn",
"noStaticElementInteractions": "warn",
"noSvgWithoutTitle": "warn",
"useAltText": "warn",
"useAnchorContent": "warn",
"useAriaActivedescendantWithTabindex": "warn",
"useAriaPropsForRole": "warn",
"useAriaPropsSupportedByRole": "warn",
"useButtonType": "warn",
"useFocusableInteractive": "warn",
"useHeadingContent": "warn",
"useHtmlLang": "warn",
"useIframeTitle": "warn",
"useKeyWithClickEvents": "warn",
"useKeyWithMouseEvents": "warn",
"useMediaCaption": "warn",
"useSemanticElements": "warn",
"useValidAnchor": "warn",
"useValidAriaProps": "warn",
"useValidAriaRole": "warn",
"useValidAriaValues": "warn",
"useValidAutocomplete": "warn",
"useValidLang": "warn",
"noAutofocus": "off",
"useGenericFontNames": "warn"
},
"complexity": {
"noAdjacentSpacesInRegex": "warn",
"noArguments": "warn",
"noBannedTypes": "warn",
"noCommaOperator": "warn",
"noEmptyTypeParameters": "warn",
"noExcessiveCognitiveComplexity": "warn",
"noExcessiveNestedTestSuites": "warn",
"noExtraBooleanCast": "warn",
"noFlatMapIdentity": "warn",
"noForEach": "warn",
"noStaticOnlyClass": "warn",
"noThisInStatic": "warn",
"noUselessCatch": "warn",
"noUselessConstructor": "warn",
"noUselessContinue": "warn",
"noUselessEmptyExport": "warn",
"noUselessEscapeInRegex": "warn",
"noUselessFragments": "warn",
"noUselessLabel": "warn",
"noUselessLoneBlockStatements": "warn",
"noUselessRename": "warn",
"noUselessStringConcat": "warn",
"noUselessStringRaw": "warn",
"noUselessSwitchCase": "warn",
"noUselessTernary": "warn",
"noUselessThisAlias": "warn",
"noUselessTypeConstraint": "warn",
"noUselessUndefinedInitialization": "warn",
"noVoid": "warn",
"useArrowFunction": "warn",
"useDateNow": "warn",
"useFlatMap": "warn",
"useIndexOf": "warn",
"useLiteralKeys": "off",
"useNumericLiterals": "warn",
"useOptionalChain": "warn",
"useRegexLiterals": "warn",
"useSimpleNumberKeys": "warn",
"useSimplifiedLogicExpression": "warn",
"useWhile": "warn",
"noExcessiveLinesPerFunction": "off",
"noImplicitCoercions": "off",
"noImportantStyles": "off"
},
"correctness": {
"noChildrenProp": "warn",
"noConstAssign": "warn",
"noConstantCondition": "warn",
"noConstantMathMinMaxClamp": "warn",
"noConstructorReturn": "warn",
"noEmptyCharacterClassInRegex": "warn",
"noEmptyPattern": "warn",
"noGlobalDirnameFilename": "warn",
"noGlobalObjectCalls": "warn",
"noInnerDeclarations": "warn",
"noInvalidBuiltinInstantiation": "warn",
"noInvalidConstructorSuper": "warn",
"noInvalidUseBeforeDeclaration": "warn",
"noNestedComponentDefinitions": "warn",
"noNonoctalDecimalEscape": "warn",
"noPrecisionLoss": "warn",
"noReactPropAssignments": "warn",
"noRenderReturnValue": "warn",
"noRestrictedElements": "warn",
"noSelfAssign": "warn",
"noSetterReturn": "warn",
"useSingleJsDocAsterisk": "warn",
"noStringCaseMismatch": "warn",
"noSwitchDeclarations": "warn",
"noUndeclaredVariables": "off",
"noUnreachable": "warn",
"noUnreachableSuper": "warn",
"noUnsafeFinally": "warn",
"noUnsafeOptionalChaining": "warn",
"noUnusedFunctionParameters": "warn",
"noUnusedImports": "warn",
"noUnusedLabels": "warn",
"noUnusedPrivateClassMembers": "warn",
"noUnusedVariables": "warn",
"noVoidElementsWithChildren": "warn",
"noVoidTypeReturn": "warn",
"useExhaustiveDependencies": "warn",
"useGraphqlNamedOperations": "warn",
"useHookAtTopLevel": "warn",
"useIsNan": "warn",
"useJsonImportAttributes": "warn",
"useJsxKeyInIterable": "warn",
"useParseIntRadix": "warn",
"useValidForDirection": "warn",
"useValidTypeof": "warn",
"useYield": "warn",
"noSolidDestructuredProps": "off",
"noUndeclaredDependencies": "off",
"noProcessGlobal": "off",
"noNodejsModules": "off",
"noPrivateImports": "off",
"useImportExtensions": "off",
"useUniqueElementIds": "off",
"noInvalidDirectionInLinearGradient": "warn",
"noInvalidGridAreas": "warn",
"noInvalidPositionAtImportRule": "warn",
"noMissingVarFunction": "warn",
"noUnknownFunction": "warn",
"noUnknownMediaFeatureName": "warn",
"noUnknownProperty": "warn",
"noUnknownPseudoClass": "warn",
"noUnknownPseudoElement": "warn",
"noUnknownTypeSelector": "warn",
"noUnknownUnit": "warn",
"noUnmatchableAnbSelector": "warn"
},
"nursery": {
"noMisusedPromises": "warn",
"noNextAsyncClientComponent": "warn",
"noNonNullAssertedOptionalChain": "warn",
"noQwikUseVisibleTask": "warn",
"noShadow": "warn",
"noUnnecessaryConditions": "warn",
"noUselessUndefined": "warn",
"noVueDataObjectDeclaration": "warn",
"noVueReservedKeys": "warn",
"noVueReservedProps": "warn",
"useAnchorHref": "warn",
"useConsistentTypeDefinitions": {
"level": "warn",
"options": {
"style": "type"
}
},
"useExhaustiveSwitchCases": "warn",
"useImageSize": "warn",
"useMaxParams": "warn",
"useQwikClasslist": "warn",
"useReactFunctionComponents": "warn",
"noSecrets": "off",
"useExplicitType": "off",
"useSortedClasses": {
"fix": "safe",
"level": "warn",
"options": {
"attributes": [
"className"
],
"functions": [
"clsx",
"cva",
"tw",
"twMerge",
"cn",
"twJoin",
"tv"
]
}
},
"noFloatingPromises": "off",
"noUnresolvedImports": "off",
"noImportCycles": "off"
},
"performance": {
"noAccumulatingSpread": "warn",
"noBarrelFile": "warn",
"noDelete": "warn",
"noDynamicNamespaceImportAccess": "warn",
"noImgElement": "warn",
"noNamespaceImport": "warn",
"noUnwantedPolyfillio": "warn",
"useGoogleFontPreconnect": "warn",
"useTopLevelRegex": "off",
"noAwaitInLoops": "off",
"noReExportAll": "off",
"useSolidForComponent": "off"
},
"security": {
"noBlankTarget": "warn",
"noDangerouslySetInnerHtml": "warn",
"noDangerouslySetInnerHtmlWithChildren": "warn",
"noGlobalEval": "warn"
},
"style": {
"noDoneCallback": "warn",
"noEnum": "warn",
"noExportedImports": "warn",
"noHeadElement": "warn",
"noInferrableTypes": "warn",
"noNamespace": "warn",
"noNegationElse": "warn",
"noNestedTernary": "warn",
"noNonNullAssertion": "warn",
"noParameterAssign": "warn",
"noParameterProperties": "warn",
"noRestrictedGlobals": "warn",
"noRestrictedImports": "warn",
"noRestrictedTypes": "warn",
"noShoutyConstants": "warn",
"noSubstr": "warn",
"noUnusedTemplateLiteral": "warn",
"noUselessElse": "warn",
"noYodaExpression": "warn",
"useArrayLiterals": "warn",
"useAsConstAssertion": "warn",
"useAtIndex": "warn",
"useBlockStatements": "warn",
"useCollapsedElseIf": "warn",
"useCollapsedIf": "warn",
"useConsistentArrayType": {
"level": "warn",
"options": {
"syntax": "generic"
}
},
"useConsistentBuiltinInstantiation": "warn",
"useConsistentMemberAccessibility": "warn",
"useConsistentObjectDefinitions": "warn",
"useConst": "warn",
"useDefaultParameterLast": "warn",
"useDefaultSwitchClause": "warn",
"useEnumInitializers": "warn",
"useExponentiationOperator": "warn",
"useExportType": "warn",
"useFilenamingConvention": {
"level": "warn",
"options": {
"requireAscii": true,
"filenameCases": [
"kebab-case"
],
"match": "[\\-$]?(.+?)[.](.+)"
}
},
"useForOf": "warn",
"useFragmentSyntax": "warn",
"useGraphqlNamingConvention": "warn",
"useGroupedAccessorPairs": "warn",
"useImportType": "warn",
"useLiteralEnumMembers": "warn",
"noMagicNumbers": "warn",
"useNodeAssertStrict": "warn",
"useNodejsImportProtocol": "warn",
"useNumberNamespace": "warn",
"useNumericSeparators": "warn",
"useObjectSpread": "warn",
"useReadonlyClassProperties": "warn",
"useSelfClosingElements": "warn",
"useShorthandAssign": "warn",
"useShorthandFunctionType": "warn",
"useSymbolDescription": "warn",
"useTemplate": "warn",
"useThrowNewError": "warn",
"useThrowOnlyError": "warn",
"useTrimStartEnd": "warn",
"useUnifiedTypeSignatures": "warn",
"noCommonJs": "off",
"noDefaultExport": "off",
"noImplicitBoolean": "off",
"noProcessEnv": "off",
"useComponentExportOnlyModules": "off",
"useConsistentCurlyBraces": "off",
"useExplicitLengthCheck": "off",
"useExportsLast": "off",
"useSingleVarDeclarator": "off",
"noDescendingSpecificity": "warn",
"noValueAtRule": "warn"
},
"suspicious": {
"noApproximativeNumericConstant": "warn",
"noArrayIndexKey": "warn",
"noAssignInExpressions": "warn",
"noAsyncPromiseExecutor": "warn",
"noBitwiseOperators": "warn",
"noConstantBinaryExpressions": "warn",
"noCatchAssign": "warn",
"noClassAssign": "warn",
"noCommentText": "warn",
"noCompareNegZero": "warn",
"noConfusingLabels": "warn",
"noConfusingVoidType": "warn",
"noConsole": "warn",
"noConstEnum": "warn",
"noControlCharactersInRegex": "warn",
"noDebugger": "warn",
"noDocumentCookie": "warn",
"noDocumentImportInPage": "warn",
"noDoubleEquals": "warn",
"noDuplicateCase": "warn",
"noDuplicateClassMembers": "warn",
"noDuplicateElseIf": "warn",
"noDuplicateJsxProps": "warn",
"noDuplicateObjectKeys": "warn",
"noDuplicateParameters": "warn",
"noDuplicateTestHooks": "warn",
"noEmptyBlockStatements": "warn",
"noEmptyInterface": "warn",
"noEvolvingTypes": "warn",
"noExplicitAny": "warn",
"noExportsInTest": "warn",
"noExtraNonNullAssertion": "warn",
"noFallthroughSwitchClause": "warn",
"noFocusedTests": "warn",
"noFunctionAssign": "warn",
"noGlobalAssign": "warn",
"noGlobalIsFinite": "warn",
"noGlobalIsNan": "warn",
"noHeadImportInDocument": "warn",
"noImplicitAnyLet": "warn",
"noImportAssign": "warn",
"noIrregularWhitespace": "warn",
"noLabelVar": "warn",
"noMisleadingCharacterClass": "warn",
"noMisleadingInstantiator": "warn",
"noMisplacedAssertion": "warn",
"noMisrefactoredShorthandAssign": "warn",
"noOctalEscape": "warn",
"noPrototypeBuiltins": "warn",
"noRedeclare": "warn",
"noRedundantUseStrict": "warn",
"noSelfCompare": "warn",
"noShadowRestrictedNames": "warn",
"noSkippedTests": "warn",
"noSparseArray": "warn",
"noSuspiciousSemicolonInJsx": "warn",
"noTemplateCurlyInString": "warn",
"noThenProperty": "warn",
"noTsIgnore": "warn",
"noUnassignedVariables": "warn",
"noUnsafeDeclarationMerging": "warn",
"noUnsafeNegation": "warn",
"noUselessEscapeInString": "warn",
"noUselessRegexBackrefs": "warn",
"noVar": "warn",
"noWith": "warn",
"useAdjacentOverloadSignatures": "warn",
"useAwait": "warn",
"useIterableCallbackReturn": "warn",
"useDefaultSwitchClauseLast": "warn",
"useErrorMessage": "warn",
"useGetterReturn": "warn",
"useGoogleFontDisplay": "warn",
"useGuardForIn": "warn",
"useIsArray": "warn",
"useNamespaceKeyword": "warn",
"useNumberToFixedDigitsArgument": "warn",
"useStaticResponseMethods": "warn",
"useStrictMode": "warn",
"noReactSpecificProps": "off",
"noDuplicateAtImportRules": "warn",
"noDuplicateCustomProperties": "warn",
"noDuplicateFontNames": "warn",
"noDuplicateProperties": "warn",
"noDuplicateSelectorsKeyframeBlock": "warn",
"noEmptyBlock": "warn",
"noImportantInKeyframe": "warn",
"noShorthandPropertyOverrides": "warn",
"noUnknownAtRules": "warn"
}
}
},
"javascript": {
"formatter": {
"arrowParentheses": "always",
"bracketSameLine": false,
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"quoteStyle": "double",
"semicolons": "always",
"trailingCommas": "es5"
}
},
"css": {
"formatter": {
"lineEnding": "lf",
"lineWidth": 80,
"quoteStyle": "double"
},
"parser": {
"allowWrongLineComments": false,
"cssModules": false
}
},
"json": {
"assist": {
"enabled": false
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"trailingCommas": "none"
},
"parser": {
"allowComments": false,
"allowTrailingCommas": false
}
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "main"
}
}