Skip to content

Instantly share code, notes, and snippets.

@gruckion
Created January 24, 2025 18:23
Show Gist options
  • Save gruckion/fa9ad030e8b894030d1a64a0be52ce82 to your computer and use it in GitHub Desktop.
Save gruckion/fa9ad030e8b894030d1a64a0be52ce82 to your computer and use it in GitHub Desktop.
Biome configuration used in a nextjs pnpm mono repo
{
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"vcs": {
"clientKind": "git",
"enabled": true,
"useIgnoreFile": true,
"defaultBranch": "main"
},
"organizeImports": {
"enabled": true
},
"files": {
"ignore": ["public", "zod", "dbt"]
},
"linter": {
"ignore": ["node_modules", ".next"],
"enabled": true,
"rules": {
"recommended": true,
"a11y": {
"noSvgWithoutTitle": "warn",
"useKeyWithClickEvents": "warn",
"useIframeTitle": "warn",
"useMediaCaption": "off",
"useSemanticElements": "off",
"useFocusableInteractive": "off"
},
"style": {
"noNonNullAssertion": "off", // TODO turn this back on
"noParameterProperties": "warn",
"useBlockStatements": "warn",
"noInferrableTypes": "error"
},
"nursery": {
"useSortedClasses": {
"fix": "safe",
"level": "warn",
"options": {
"attributes": ["classList"],
"functions": ["clsx", "cva", "tw", "twMerge", "cn", "twJoin"]
}
}
},
"correctness": {
"useExhaustiveDependencies": "warn",
"noUndeclaredVariables": "warn"
},
"complexity": {
"noForEach": "warn",
"noUselessTypeConstraint": "error"
},
"suspicious": {
"noExplicitAny": "warn",
"noArrayIndexKey": "warn"
}
}
},
"javascript": {
"jsxRuntime": "transparent",
"formatter": {
"enabled": true,
"quoteProperties": "asNeeded",
"trailingCommas": "none",
"semicolons": "always",
"arrowParentheses": "asNeeded",
"jsxQuoteStyle": "double",
"bracketSpacing": true,
"quoteStyle": "double",
"attributePosition": "auto"
},
"globals": [
"React",
"JSX",
"describe",
"test",
"it",
"xit",
"skip",
"expect",
"beforeEach",
"afterEach",
"beforeAll",
"afterAll",
"jest"
]
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"attributePosition": "auto"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment