Skip to content

performant

A variant of recommended for projects where performance is a priority and some lint rules get in the way.

biome.json
{
"extends": ["@repobuddy/biome/performant"]
}

None. The config takes no parameters.

This is the content of packages/biome/performant.jsonc.

{
"files": {
"includes": ["**", "!**/.vscode/**/*.txt", "!**/*.md"]
},
"formatter": {
"enabled": true,
"indentStyle": "tab",
"lineEnding": "lf",
"lineWidth": 120
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded",
"trailingCommas": "none"
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noForEach": "off",
"useLiteralKeys": "off",
"noCommaOperator": "off"
},
"correctness": {
"noInnerDeclarations": "warn",
"noUnusedVariables": { "level": "error", "options": { "ignoreRestSiblings": true } },
"useExhaustiveDependencies": "off"
},
"style": {
"noNonNullAssertion": "off",
"noParameterAssign": "off",
"useTemplate": "off",
"useAsConstAssertion": "error",
"useDefaultParameterLast": "error",
"useEnumInitializers": "error",
"useSelfClosingElements": "error",
"useSingleVarDeclarator": "error",
"noUnusedTemplateLiteral": "error",
"useNumberNamespace": "error",
"noInferrableTypes": "error",
"noUselessElse": "error",
"useNodejsImportProtocol": "error"
},
"suspicious": {
"noAssignInExpressions": "off",
"noExplicitAny": "off",
"noVar": "off"
}
}
},
"assist": { "actions": { "source": { "organizeImports": "off" } } },
"overrides": [
{
"includes": ["**/package.json"],
"formatter": { "lineWidth": 20 }
}
]
}

Identical to recommended: **, minus **/.vscode/**/*.txt and **/*.md.

Same as recommended (tabs, lf, width 120, single quotes, semicolons as needed, package.json width 20), with one change: javascript.formatter.trailingCommas is none.

linter.enabled and recommended are true. The rules below are the same as in recommended, with the same levels and options: noForEach, useLiteralKeys, noCommaOperator, noUnusedVariables, useExhaustiveDependencies, noNonNullAssertion, noParameterAssign, useTemplate, useAsConstAssertion, useDefaultParameterLast, useEnumInitializers, useSelfClosingElements, useSingleVarDeclarator, noUnusedTemplateLiteral, useNumberNamespace, noInferrableTypes, noUselessElse, useNodejsImportProtocol, noAssignInExpressions, and noExplicitAny. See recommended for what each rule flags.

The rules that differ from recommended:

Rule Level in performant Biome default (2.5.15) Effect
correctness/noInnerDeclarations warn error Reports var and function declarations in nested blocks as warnings.
correctness/noUnusedImports not set warn Reports unused imports as warnings, not errors.
suspicious/noVar off not reported var is accepted.
suspicious/noConsole not set not reported console.log() is accepted.
Action Value
assist.actions.source.organizeImports off
includes Effect
**/package.json formatter.lineWidth is 20

There is no JSON parser override, so comments and trailing commas in tsconfig*.json and .vscode/**/*.json follow Biome’s own parsing.

Each fixture under packages/biome/tests/performant exercises one rule.

Flagged at error:

// style/useNodejsImportProtocol
import { deepEqual } from 'assert'

Flagged at warn:

// correctness/noInnerDeclarations
export function noInnerDeclarations(): string {
const greeting = 'Hello World!'
if (greeting) {
var c = greeting[0]
return c!
}
return greeting
}

Accepted because the rule is off:

// suspicious/noVar
export function hello(): string {
var greeting = 'Hello World!'
return greeting
}
// complexity/noForEach
;[].forEach((x) => void console.info(x))
// style/useTemplate
export const s = foo + 'b'