Last active
March 10, 2025 14:04
-
-
Save GaussianWonder/6fbd12d90fd78ea8d98930e66772530e to your computer and use it in GitHub Desktop.
Opinionated biome.js config. Works well for both frontend and backend services.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", | |
"organizeImports": { | |
"enabled": true | |
}, | |
"linter": { | |
"enabled": true, | |
"rules": { | |
"recommended": true, | |
"complexity": { | |
"recommended": true, | |
"noExtraBooleanCast": "warn", | |
"noStaticOnlyClass": "off", | |
"noThisInStatic": "error", | |
"noUselessCatch": "error", | |
"noUselessSwitchCase": "warn", | |
"noUselessTernary": "warn", | |
"useArrowFunction": "error", | |
"useLiteralKeys": "warn", | |
"useSimplifiedLogicExpression": "warn" | |
}, | |
"correctness": { | |
"recommended": true, | |
"noNodejsModules": "off", | |
"useIsNan": "error", | |
"useYield": "error" | |
}, | |
"performance": { | |
"recommended": true, | |
"noAccumulatingSpread": "error" | |
}, | |
"style": { | |
"recommended": true, | |
"noDefaultExport": "off", | |
"noNegationElse": "error", | |
"noNonNullAssertion": "warn", | |
"noShoutyConstants": "error", | |
"noUnusedTemplateLiteral": "error", | |
"noVar": "error", | |
"noUselessElse": "error", | |
"useConsistentArrayType": "error", | |
"useConst": "error", | |
"useExportType": "error", | |
"useFilenamingConvention": "error", | |
"useImportType": "error", | |
"useNamingConvention": "off", | |
"useNodejsImportProtocol": "error", | |
"useNumberNamespace": "error", | |
"useShorthandArrayType": "error", | |
"useShorthandAssign": "error", | |
"useShorthandFunctionType": "error" | |
}, | |
"suspicious": { | |
"recommended": true, | |
"noCatchAssign": "error", | |
"noDoubleEquals": "error", | |
"noExplicitAny": "warn", | |
"noFallthroughSwitchClause": "off", | |
"noGlobalIsFinite": "error", | |
"useAwait": "warn", | |
"useIsArray": "error", | |
"useDefaultSwitchClauseLast": "error" | |
}, | |
"nursery": { | |
"recommended": true, | |
"noSubstr": "error", | |
"useDeprecatedReason": "error" | |
} | |
} | |
}, | |
"formatter": { | |
"enabled": true, | |
"lineEnding": "lf", | |
"indentStyle": "space", | |
"lineWidth": 100 | |
}, | |
"javascript": { | |
"formatter": { | |
"enabled": true, | |
"trailingCommas": "all", | |
"semicolons": "always", | |
"quoteStyle": "double", | |
"bracketSpacing": true, | |
"arrowParentheses": "asNeeded" | |
}, | |
"linter": { | |
"enabled": true | |
} | |
}, | |
"json": { | |
"formatter": { | |
"enabled": true, | |
"trailingCommas": "none" | |
}, | |
"linter": { | |
"enabled": true | |
}, | |
"parser": { | |
"allowComments": true | |
} | |
}, | |
"vcs": { | |
"enabled": true, | |
"clientKind": "git", | |
"useIgnoreFile": true | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"files.exclude": { | |
"**/*.tsbuildinfo": true, | |
"**/.git": true | |
}, | |
"search.exclude": { | |
"**/node_modules": true, | |
"**/*.tsbuildinfo": true, | |
"**/*.code-search": true | |
}, | |
"editor.formatOnType": false, | |
"editor.formatOnPaste": true, | |
"editor.formatOnSave": true, | |
"editor.formatOnSaveMode": "file", | |
"files.autoSave": "onFocusChange", | |
"editor.codeActionsOnSave": { | |
"quickfix.biome": "explicit", | |
"source.organizeImports.biome": "always", | |
"source.fixAll.biome": "explicit" | |
}, | |
"[json]": { | |
"editor.quickSuggestions": { | |
"strings": true | |
}, | |
"editor.suggest.insertMode": "replace", | |
"editor.defaultFormatter": "biomejs.biome" | |
}, | |
"[typescript]": { | |
"editor.defaultFormatter": "biomejs.biome" | |
} | |
} |
Author
GaussianWonder
commented
Mar 10, 2025
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment