Skip to content

Instantly share code, notes, and snippets.

@ilkergzlkkr
Last active April 17, 2025 20:35
Show Gist options
  • Save ilkergzlkkr/e821242c72a0418a3acf426ed11077d5 to your computer and use it in GitHub Desktop.
Save ilkergzlkkr/e821242c72a0418a3acf426ed11077d5 to your computer and use it in GitHub Desktop.
Biome Config
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"files": { "ignore": ["*/routeTree.gen.ts"], "ignoreUnknown": false },
"formatter": {
"attributePosition": "auto",
"bracketSpacing": true,
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "crlf",
"lineWidth": 80,
"useEditorconfig": true
},
"javascript": {
"formatter": {
"arrowParentheses": "always",
"attributePosition": "auto",
"bracketSameLine": false,
"bracketSpacing": true,
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"quoteStyle": "double",
"semicolons": "always",
"trailingCommas": "all"
}
},
"linter": {
"enabled": true,
"rules": {
"complexity": {
"noExtraBooleanCast": "error",
"noMultipleSpacesInRegularExpressionLiterals": "error",
"noUselessCatch": "error",
"noUselessConstructor": "error",
"noUselessLoneBlockStatements": "error",
"noUselessRename": "error",
"noUselessTernary": "error",
"noUselessUndefinedInitialization": "error",
"noWith": "error",
"useLiteralKeys": "error",
"useRegexLiterals": "error"
},
"correctness": {
"noConstAssign": "error",
"noEmptyCharacterClassInRegex": "off",
"noEmptyPattern": "error",
"noGlobalObjectCalls": "error",
"noInvalidBuiltinInstantiation": "error",
"noInvalidConstructorSuper": "error",
"noInvalidUseBeforeDeclaration": "error",
"noPrecisionLoss": "error",
"noSelfAssign": "error",
"noSwitchDeclarations": "error",
"noUndeclaredVariables": "error",
"noUnreachable": "error",
"noUnreachableSuper": "error",
"noUnsafeFinally": "error",
"noUnusedImports": "warn",
"noUnusedVariables": "warn",
"useArrayLiterals": "error",
"useExhaustiveDependencies": "warn",
"useHookAtTopLevel": "error",
"useIsNan": "error"
},
"nursery": {
"useSortedClasses": {
"fix": "safe",
"level": "warn",
"options": {}
}
},
"recommended": false,
"security": { "noGlobalEval": "error" },
"style": {
"noArguments": "error",
"noCommaOperator": "error",
"noRestrictedGlobals": {
"level": "error",
"options": { "deniedGlobals": ["global", "self"] }
},
"noVar": "error",
"noYodaExpression": "error",
"useConsistentBuiltinInstantiation": "error",
"useConst": "error",
"useExponentiationOperator": "error",
"useNodejsImportProtocol": "error",
"useNumberNamespace": "error",
"useSingleVarDeclarator": "error",
"useTemplate": "error",
"useThrowNewError": "off"
},
"suspicious": {
"noArrayIndexKey": "warn",
"noAsyncPromiseExecutor": "error",
"noCatchAssign": "error",
"noClassAssign": "error",
"noCompareNegZero": "error",
"noConsole": {
"level": "warn",
"options": { "allow": ["warn", "error"] }
},
"noControlCharactersInRegex": "error",
"noDebugger": "error",
"noDoubleEquals": "error",
"noDuplicateCase": "error",
"noDuplicateClassMembers": "error",
"noDuplicateJsxProps": "warn",
"noDuplicateObjectKeys": "error",
"noDuplicateParameters": "error",
"noEmptyBlockStatements": "error",
"noFallthroughSwitchClause": "error",
"noFunctionAssign": "error",
"noGlobalAssign": "error",
"noImportAssign": "error",
"noMisleadingCharacterClass": "error",
"noPrototypeBuiltins": "error",
"noRedeclare": "error",
"noSelfCompare": "error",
"noShadowRestrictedNames": "error",
"noSparseArray": "error",
"noUnsafeNegation": "error",
"useDefaultSwitchClauseLast": "error",
"useErrorMessage": "error",
"useValidTypeof": "error"
}
}
},
"organizeImports": { "enabled": true },
"vcs": { "clientKind": "git", "enabled": true }
}
{
// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[css]": {
"editor.defaultFormatter": "biomejs.biome"
},
"editor.formatOnSave": true,
"files.readonlyInclude": {
"**/routeTree.gen.ts": true
},
"files.watcherExclude": {
"**/routeTree.gen.ts": true
},
"search.exclude": {
"**/routeTree.gen.ts": true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment