@suin/biome.json
Version:
Opinionated Biome configuration extending ultracite with additional rules
647 lines • 19.4 kB
JSON
{
"root": false,
"$schema": "../node_modules/@biomejs/biome/configuration_schema.json",
"files": {
"ignoreUnknown": true,
"includes": [
"**",
"!**/_generated/**/*",
"!**/*.gen.*",
"!**/.next/**/*",
"!**/next-env.d.ts",
"!**/.nuxt/**/*",
"!**/.output/**/*",
"!**/.svelte-kit/**/*",
"!**/.vitepress/cache/**/*",
"!**/.vitepress/dist/**/*",
"!**/dist/**/*",
"!**/build/**/*",
"!**/out/**/*",
"!**/.turbo/**/*",
"!**/.vercel/**/*",
"!**/.netlify/**/*",
"!**/storybook-static/**/*",
"!**/.docusaurus/**/*",
"!**/.cache/**/*",
"!**/public/build/**/*",
"!**/.parcel-cache/**/*",
"!**/.vite/**/*",
"!**/.astro/**/*",
"!**/_astro/**/*",
"!**/coverage/**/*",
"!**/.nyc_output/**/*",
"!**/*.generated.*",
"!**/*.auto.*",
"!**/generated/**/*",
"!**/auto-generated/**/*",
"!**/codegen/**/*",
"!**/__generated__/**/*",
"!**/graphql-types.*",
"!**/schema.d.ts",
"!**/schema.graphql.d.ts",
"!**/*.d.ts.map",
"!**/.expo/**/*",
"!**/.expo-shared/**/*",
"!**/android/build/**/*",
"!**/ios/build/**/*",
"!**/DerivedData/**/*"
]
},
"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": {
"noConstantCondition": "warn",
"noConstantMathMinMaxClamp": "warn",
"noConstAssign": "warn",
"noConstructorReturn": "warn",
"noEmptyCharacterClassInRegex": "warn",
"noEmptyPattern": "warn",
"noGlobalDirnameFilename": "warn",
"noGlobalObjectCalls": "warn",
"noInnerDeclarations": "warn",
"noInvalidBuiltinInstantiation": "warn",
"noInvalidConstructorSuper": "warn",
"noInvalidUseBeforeDeclaration": "warn",
"noNonoctalDecimalEscape": "warn",
"noPrecisionLoss": "warn",
"noRestrictedElements": "warn",
"noSelfAssign": "warn",
"noSetterReturn": "warn",
"noStringCaseMismatch": "warn",
"noSwitchDeclarations": "warn",
"noUndeclaredVariables": "off",
"noUnreachable": "warn",
"noUnreachableSuper": "warn",
"noUnsafeFinally": "warn",
"noUnsafeOptionalChaining": "warn",
"noUnusedFunctionParameters": "warn",
"noUnusedImports": {
"fix": "safe",
"level": "warn"
},
"noUnusedLabels": "warn",
"noUnusedPrivateClassMembers": "warn",
"noUnusedVariables": "warn",
"noVoidTypeReturn": "warn",
"useGraphqlNamedOperations": "warn",
"useImageSize": "warn",
"useIsNan": "warn",
"useParseIntRadix": "warn",
"useSingleJsDocAsterisk": "warn",
"useValidForDirection": "warn",
"useValidTypeof": "warn",
"useYield": "warn",
"noNodejsModules": "off",
"noPrivateImports": "off",
"noProcessGlobal": "off",
"noUndeclaredDependencies": "off",
"useImportExtensions": "off",
"useUniqueElementIds": "off",
"useJsonImportAttributes": "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": {
"noDuplicateDependencies": "warn",
"noEmptySource": "warn",
"noIncrementDecrement": {
"level": "warn",
"options": {
"allowForLoopAfterthoughts": true
}
},
"noParametersOnlyUsedInRecursion": "warn",
"noShadow": "warn",
"noUnusedExpressions": "warn",
"noUselessUndefined": "warn",
"useConsistentArrowReturn": "warn",
"useDeprecatedDate": "warn",
"useMaxParams": "warn",
"noContinue": "off",
"noJsxLiterals": "off",
"noUselessCatchBinding": "off",
"noUnnecessaryConditions": "off",
"useExplicitType": "off",
"useSortedClasses": {
"fix": "safe",
"level": "warn",
"options": {
"attributes": [
"className"
],
"functions": [
"clsx",
"cva",
"tw",
"twMerge",
"cn",
"twJoin",
"tv"
]
}
},
"noDeprecatedImports": "off",
"noFloatingPromises": "off",
"noMisusedPromises": "off",
"noUnresolvedImports": "off",
"noImportCycles": "off",
"useExhaustiveSwitchCases": "off"
},
"performance": {
"noAccumulatingSpread": "warn",
"noBarrelFile": "warn",
"noDelete": "warn",
"noDynamicNamespaceImportAccess": "warn",
"noNamespaceImport": "warn",
"noUnwantedPolyfillio": "warn",
"useGoogleFontPreconnect": "warn",
"useTopLevelRegex": "off",
"noAwaitInLoops": "off",
"noReExportAll": "off"
},
"security": {
"noBlankTarget": "warn",
"noDangerouslySetInnerHtml": "warn",
"noDangerouslySetInnerHtmlWithChildren": "warn",
"noGlobalEval": "warn",
"noSecrets": "off"
},
"style": {
"noDoneCallback": "warn",
"noEnum": "warn",
"noExportedImports": "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",
"useConsistentTypeDefinitions": {
"level": "warn",
"options": {
"style": "type"
}
},
"useConst": "warn",
"useDefaultParameterLast": "warn",
"useDefaultSwitchClause": "warn",
"useDeprecatedReason": "warn",
"useEnumInitializers": "warn",
"useExponentiationOperator": "warn",
"useExportType": "warn",
"useFilenamingConvention": {
"level": "warn",
"options": {
"requireAscii": true,
"filenameCases": [
"kebab-case"
]
}
},
"useForOf": "warn",
"useFragmentSyntax": "warn",
"useGraphqlNamingConvention": "warn",
"useGroupedAccessorPairs": "warn",
"useImportType": "warn",
"useLiteralEnumMembers": "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",
"noMagicNumbers": "off",
"noProcessEnv": "off",
"useComponentExportOnlyModules": "off",
"useConsistentCurlyBraces": "off",
"useExplicitLengthCheck": "off",
"useExportsLast": "off",
"useNamingConvention": "off",
"useSingleVarDeclarator": "off",
"noDescendingSpecificity": "warn",
"noValueAtRule": "warn"
},
"suspicious": {
"noAlert": "warn",
"noApproximativeNumericConstant": "warn",
"noAssignInExpressions": "warn",
"noAsyncPromiseExecutor": "warn",
"noBiomeFirstException": "warn",
"noBitwiseOperators": "warn",
"noCatchAssign": "warn",
"noClassAssign": "warn",
"noCommentText": "warn",
"noCompareNegZero": "warn",
"noConfusingLabels": "warn",
"noConfusingVoidType": "warn",
"noConstantBinaryExpressions": "warn",
"noConstEnum": "warn",
"noControlCharactersInRegex": "warn",
"noDebugger": "warn",
"noDocumentCookie": "warn",
"noDoubleEquals": "warn",
"noDuplicateCase": "warn",
"noDuplicateClassMembers": "warn",
"noDuplicateElseIf": "warn",
"noDuplicateFields": "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",
"noImplicitAnyLet": "warn",
"noImportAssign": "warn",
"noIrregularWhitespace": "warn",
"noLabelVar": "warn",
"noMisleadingCharacterClass": "warn",
"noMisleadingInstantiator": "warn",
"noMisplacedAssertion": "warn",
"noMisrefactoredShorthandAssign": "warn",
"noOctalEscape": "warn",
"noPrototypeBuiltins": "warn",
"noQuickfixBiome": "warn",
"noRedeclare": "warn",
"noRedundantUseStrict": "warn",
"noSelfCompare": "warn",
"noShadowRestrictedNames": "warn",
"noSkippedTests": "warn",
"noSparseArray": "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",
"useBiomeIgnoreFolder": "warn",
"useDefaultSwitchClauseLast": "warn",
"useErrorMessage": "warn",
"useGetterReturn": "warn",
"useGoogleFontDisplay": "warn",
"useGuardForIn": "warn",
"useIsArray": "warn",
"useIterableCallbackReturn": "warn",
"useNamespaceKeyword": "warn",
"useNumberToFixedDigitsArgument": "warn",
"useStaticResponseMethods": "warn",
"useStrictMode": "warn",
"noNonNullAssertedOptionalChain": "warn",
"noConsole": "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",
"semicolons": "always",
"trailingCommas": "es5",
"quoteStyle": "double"
}
},
"css": {
"formatter": {
"lineEnding": "lf",
"lineWidth": 80,
"quoteStyle": "double"
},
"parser": {
"allowWrongLineComments": false,
"cssModules": false,
"tailwindDirectives": true
}
},
"json": {
"assist": {
"enabled": false
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"trailingCommas": "none"
},
"parser": {
"allowComments": false,
"allowTrailingCommas": false
}
},
"html": {
"formatter": {
"enabled": true
}
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "main"
},
"overrides": [
{
"includes": [
"*.config.{js,ts,mjs,cjs,mts,cts}",
"vite.config.*",
"vitest.config.*",
"jest.config.*",
"rollup.config.*",
"webpack.config.*",
"eslint.config.*",
"prettier.config.*",
"stylelint.config.*",
"commitlint.config.*",
"lint-staged.config.*",
"postcss.config.*",
"tailwind.config.*",
"playwright.config.*",
"cypress.config.*",
"babel.config.*",
"metro.config.*",
"next.config.*",
"nuxt.config.*",
"astro.config.*",
"svelte.config.*",
"tsup.config.*"
]
},
{
"includes": [
"**/*.{test,spec}.{ts,tsx,js,jsx}",
"**/__tests__/**/*"
],
"linter": {
"rules": {
"complexity": {
"noExcessiveCognitiveComplexity": "off"
},
"suspicious": {
"noConsole": "off",
"noExplicitAny": "off"
}
}
}
},
{
"includes": [
"**/scripts/**/*",
"**/bin/**/*",
"*.mjs",
"*.cjs"
],
"linter": {
"rules": {
"suspicious": {
"noConsole": "off"
},
"style": {
"noProcessEnv": "off"
}
}
}
},
{
"includes": [
"**/*.{stories,story}.{ts,tsx,js,jsx}"
],
"linter": {
"rules": {
"correctness": {
"noUnusedVariables": "off",
"noUnusedImports": "off"
}
}
}
},
{
"includes": [
"**/*.d.ts",
"**/{env,global,types}.d.ts"
],
"linter": {
"rules": {
"correctness": {
"noUnusedVariables": "off",
"noUndeclaredVariables": "off"
}
}
}
},
{
"includes": [
"**/dist/**/*",
"**/build/**/*",
"**/.next/**/*",
"**/.nuxt/**/*",
"**/out/**/*",
"**/coverage/**/*",
"**/*.min.js",
"**/*.min.css",
"**/*.md",
"**/*.mdx",
"**/*.graphql",
"**/*.gql",
".env",
".env.*"
],
"formatter": {
"enabled": false
},
"linter": {
"enabled": false
}
},
{
"includes": [
"**/package.json",
"**/{tsconfig,jsconfig}.json",
"**/tsconfig.*.json",
".vscode/*.json",
".github/**/*.json"
],
"json": {
"parser": {
"allowComments": true,
"allowTrailingCommas": true
}
}
}
]
}