{"id":41498816,"url":"https://github.com/dvashim/biome-config","last_synced_at":"2026-04-01T21:59:19.197Z","repository":{"id":334216030,"uuid":"1140490411","full_name":"dvashim/biome-config","owner":"dvashim","description":"Shared Biome configurations for linting, formatting, and enforcing consistent code style across JavaScript, TypeScript, JSX, CSS, JSON, and HTML","archived":false,"fork":false,"pushed_at":"2026-03-29T11:27:29.000Z","size":283,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-29T14:18:33.707Z","etag":null,"topics":["biomejs","configuration","formatting","javascript","json","linter","typescript"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dvashim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-23T10:51:55.000Z","updated_at":"2026-03-29T11:26:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dvashim/biome-config","commit_stats":null,"previous_names":["dvashim/biome-config"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/dvashim/biome-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvashim%2Fbiome-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvashim%2Fbiome-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvashim%2Fbiome-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvashim%2Fbiome-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dvashim","download_url":"https://codeload.github.com/dvashim/biome-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvashim%2Fbiome-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["biomejs","configuration","formatting","javascript","json","linter","typescript"],"created_at":"2026-01-23T19:01:40.325Z","updated_at":"2026-04-01T21:59:19.190Z","avatar_url":"https://github.com/dvashim.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Biome Configurations\n\n[![CI][ci-badge]][ci-url]\n[![npm version][version-badge]][npm-url]\n[![npm downloads][downloads-badge]][npm-url]\n[![license][license-badge]][license-url]\n[![Checked with Biome][biome-badge]][biome-url]\n\n[ci-badge]: https://img.shields.io/github/actions/workflow/status/dvashim/biome-config/check.yml?style=flat-square\u0026logo=github\u0026label=CI\n[ci-url]: https://github.com/dvashim/biome-config/actions/workflows/check.yml\n[version-badge]: https://img.shields.io/npm/v/@dvashim/biome-config.svg?logo=npm\u0026style=flat-square\u0026color=07c\u0026label=@dvashim/biome-config\n[downloads-badge]: https://img.shields.io/npm/dm/@dvashim/biome-config?logo=npm\u0026style=flat-square\u0026color=07c\n[npm-url]: https://www.npmjs.com/package/@dvashim/biome-config\n[license-badge]: https://img.shields.io/npm/l/@dvashim/biome-config?style=flat-square\u0026color=07c\n[license-url]: https://github.com/dvashim/biome-config/blob/main/LICENSE\n[biome-badge]: https://img.shields.io/badge/Checked_with-Biome-60a5fa?style=flat-square\u0026logo=biome\u0026color=07c\u0026logoColor=fff\n[biome-url]: https://biomejs.dev\n\n## Installation\n\nnpm:\n\n```bash\nnpm install -D @dvashim/biome-config\n```\n\nor pnpm:\n\n```bash\npnpm add -D @dvashim/biome-config\n```\n\n## Configurations\n\n| Domain | Level | Path |\n|--------|------------|------|\n| Base | recommended | `@dvashim/biome-config` or `@dvashim/biome-config/recommended` |\n| React | recommended | `@dvashim/biome-config/react-recommended` |\n| React | balanced | `@dvashim/biome-config/react-balanced` |\n| React | strict | `@dvashim/biome-config/react-strict` |\n\n\u003cbr\u003e\n\n## Use\n\nBase recommended configuration:\n\n```jsonc\n// biome.json (Base recommended)\n// This configuration provides a base setup for linting,\n// formatting, and code consistency across JavaScript,\n// JSX, JSON, and HTML files.\n// No files.includes is set — Biome will process all supported\n// files in the project directory by default.\n\n{\n  \"extends\": [\"@dvashim/biome-config\"]\n}\n```\n\nReact recommended configuration:\n\n```jsonc\n// biome.json (React recommended)\n// This configuration extends the base recommended configuration\n// and enables the recommended rules for the React domain.\n// Includes all files except dist/ (files.includes: [\"**\", \"!!**/dist\"]).\n\n{\n  \"extends\": [\"@dvashim/biome-config/react-recommended\"]\n}\n```\n\nReact strict configuration:\n\n```jsonc\n// biome.json (React strict)\n// This configuration enables recommended lint rules,\n// including React-specific recommended rules,\n// and opts into nursery (experimental) rules.\n// Includes all files except dist/ (files.includes: [\"**\", \"!!**/dist\"]).\n\n{\n  \"extends\": [\"@dvashim/biome-config/react-strict\"]\n}\n```\n\nReact balanced configuration:\n\n```jsonc\n// biome.json (React balanced)\n// This configuration enables recommended lint rules,\n// including React-specific recommended rules,\n// with a few rules intentionally disabled\n// to reduce false positives / noise.\n// Includes all files except dist/ (files.includes: [\"**\", \"!!**/dist\"]).\n\n{\n  \"extends\": [\"@dvashim/biome-config/react-balanced\"]\n}\n```\n\n## Defaults\n\nAll configurations share the same base defaults.\n\n### Schema\n\n`https://biomejs.dev/schemas/2.4.10/schema.json`\n\n### Formatter\n\n| Option | Value |\n|--------|-------|\n| attributePosition | `\"auto\"` |\n| bracketSameLine | `false` |\n| bracketSpacing | `true` |\n| expand | `\"auto\"` |\n| formatWithErrors | `false` |\n| indentStyle | `\"space\"` |\n| indentWidth | `2` |\n| lineEnding | `\"lf\"` |\n| lineWidth | `80` |\n| useEditorconfig | `true` |\n\n### JavaScript\n\n| Option | Value |\n|--------|-------|\n| experimentalEmbeddedSnippetsEnabled | `true` |\n| jsxRuntime | `\"transparent\"` |\n\n### JavaScript Formatter\n\n| Option | Value |\n|--------|-------|\n| arrowParentheses | `\"always\"` |\n| jsxQuoteStyle | `\"double\"` |\n| operatorLinebreak | `\"before\"` |\n| quoteProperties | `\"asNeeded\"` |\n| quoteStyle | `\"single\"` |\n| semicolons | `\"asNeeded\"` |\n| trailingCommas | `\"es5\"` |\n\n### JSON\n\n| Option | Value |\n|--------|-------|\n| allowComments | `true` |\n| allowTrailingCommas | `true` |\n\n### HTML\n\n| Option | Value |\n|--------|-------|\n| experimentalFullSupportEnabled | `true` |\n\n### Files (React configs only)\n\n| Option | Value |\n|--------|-------|\n| includes | `[\"**\", \"!!**/dist\"]` |\n\n### VCS\n\n| Option | Value |\n|--------|-------|\n| clientKind | `\"git\"` |\n| enabled | `true` |\n| defaultBranch | `\"main\"` |\n| useIgnoreFile | `true` |\n\n### Overrides\n\n| File pattern   | Setting                              | Value      |\n|----------------|--------------------------------------|------------|\n| `package.json` | assist.actions.source.useSortedKeys  | `\"off\"`    |\n| `package.json` | json.formatter.expand                | `\"always\"` |\n\n### Assist\n\n| Option | Value |\n|--------|-------|\n| actions.recommended | `true` |\n| actions.source.noDuplicateClasses | `\"on\"` |\n\n## Rules\n\n### Base recommended\n\nEnables all **recommended Biome rules** out of the box with no custom overrides. Provides sensible defaults for code quality, correctness, and best practices across JavaScript, JSX, JSON, and HTML.\n\n---\n\n### React recommended\n\nSame as base recommended, plus enables the **React domain** (`\"react\": \"recommended\"`), which activates React-specific recommended rules for hooks, JSX, and component patterns.\n\n---\n\n### React strict\n\nThe most opinionated configuration. Enables all recommended rules plus **180+ optional and nursery rules** across 8 categories. Every non-recommended JS/TS rule available in Biome is explicitly configured.\n\n- **a11y** — Selectively disables noisy rules (`useButtonType`, `useKeyWithClickEvents`, `useSemanticElements`, `noStaticElementInteractions`, `noNoninteractiveElementToInteractiveRole`) while keeping the rest at recommended defaults.\n\n- **complexity** (12 rules) — Monitors cognitive complexity, function length, nested test suites, and logic expressions. Warns on `forEach`, implicit coercions, `void`, and useless patterns.\n\n- **correctness** (12 rules) — Ensures no undeclared variables/dependencies, proper React patterns (`noReactPropAssignments`, `noNestedComponentDefinitions`), Node.js guards (`noNodejsModules`, `noProcessGlobal`, `noGlobalDirnameFilename`), and JSON import attributes. `noUnresolvedImports` is disabled since TypeScript already performs these checks.\n\n- **nursery** (73 rules) — Opts into all experimental rules. Highlights include:\n  - **Errors:** `noJsxPropsBind`, `noLeakedRender`, `noMisusedPromises`, `noMultiAssign`, `noParametersOnlyUsedInRecursion`\n  - **Promises:** `noFloatingPromises`, `noNestedPromises`, `useAwaitThenable`\n  - **TypeScript:** `useConsistentEnumValueType`, `useConsistentMethodSignatures`, `useExhaustiveSwitchCases`, `useNullishCoalescing`\n  - **Regex:** `useNamedCaptureGroup`, `useUnicodeRegex`, `useRegexpExec`\n  - **Styling:** `noDuplicateSelectors`, `noInlineStyles`\n  - **Playwright:** Full suite of 10 Playwright rules\n  - **Drizzle:** `noDrizzleDeleteWithoutWhere`, `noDrizzleUpdateWithoutWhere`\n  - **Tailwind:** `useSortedClasses`, `noFloatingClasses`\n  - **Dependencies:** `noUntrustedLicenses`\n  - **Disabled:** `noTernary`, `useExplicitType`\n\n- **performance** (6 rules) — Warns on `await` in loops, barrel files, `delete`, namespace imports, re-export all, and non-top-level regex.\n\n- **security** — `noSecrets`\n\n- **style** (56 rules) — Enforces consistent syntax, naming conventions (`strictCase: true`), array shorthand syntax, `type` over `interface`, React function components, readonly class properties, `noDefaultExport`, `noMagicNumbers`, `noJsxLiterals`, and more.\n\n- **suspicious** (22 rules) — Flags `var` (error), `console`, `alert`, bitwise operators, empty blocks, import cycles, evolving types, skipped tests, and deprecated imports.\n\n---\n\n### React balanced\n\nSame rule set as strict, with **targeted relaxations** to reduce false positives and noise in real-world projects:\n\n| Rule | Strict | Balanced | Reason |\n|------|--------|----------|--------|\n| `noImplicitCoercions` | warn | off | Too noisy with `!!value` patterns |\n| `noExcessiveLinesPerFunction` | warn (default) | warn (maxLines: 100) | Higher threshold |\n| `noContinue` | warn | info | Informational only |\n| `noIncrementDecrement` | warn | warn (allowForLoopAfterthoughts) | Allows `i++` in for loops |\n| `noUselessReturn` | warn | info | Informational only |\n| `noBarrelFile` | warn | off | Common pattern in libraries |\n| `noNamespaceImport` | warn | off | Allows `import * as` |\n| `noReExportAll` | warn | off | Common pattern in libraries |\n| `noDefaultExport` | warn | off | Allows default exports |\n| `noImplicitBoolean` | warn | info | Informational only |\n| `noJsxLiterals` | warn | off | Allows inline text in JSX |\n| `noMagicNumbers` | warn | info | Informational only |\n| `noNestedTernary` | warn | off | Allows nested ternaries |\n| `useNamingConvention` | strictCase: true | strictCase: false | More lenient casing |\n\n## FAQ\n\n### Which config should I start with?\n\n- **Non-React projects** — use `@dvashim/biome-config` (base recommended).\n- **React projects** — start with `react-balanced` for a good trade-off between strictness and practicality. Move to `react-strict` once your codebase is clean, or `react-recommended` if you only want Biome's built-in defaults.\n\n### How do I override a rule from the preset?\n\nAdd a `linter.rules` section in your `biome.json`. Local settings merge with and take precedence over the preset:\n\n```jsonc\n{\n  \"extends\": [\"@dvashim/biome-config/react-balanced\"],\n  \"linter\": {\n    \"rules\": {\n      \"style\": {\n        \"noDefaultExport\": \"error\"\n      }\n    }\n  }\n}\n```\n\n### How do I exclude additional files or directories?\n\nThe simplest approach is to add paths to your `.gitignore` — all presets enable `vcs.useIgnoreFile`, so Biome respects `.gitignore` patterns automatically.\n\nFor exclusions that should not affect Git tracking, use negated patterns in `files.includes`. The `!!` prefix force-ignores paths (prevents scanning entirely), while `!` excludes matches from results:\n\n```jsonc\n{\n  \"extends\": [\"@dvashim/biome-config\"],\n  \"files\": {\n    \"includes\": [\"**\", \"!!**/generated\", \"!!**/coverage\"]\n  }\n}\n```\n\n### Why does the base config not set `files.includes`?\n\nThe base recommended config intentionally omits `files.includes` so consumers control their own file scope. Biome processes all supported files by default when no `includes` is set. The React configs set `files.includes` to `[\"**\", \"!!**/dist\"]` to explicitly exclude build output.\n\n### Can I use this with TypeScript?\n\nYes. Biome natively supports TypeScript — no additional configuration is needed. All presets apply to `.ts` and `.tsx` files automatically.\n\n### Can I use this in a monorepo?\n\nYes. Install the package at the root and reference it in each workspace's `biome.json`. Each workspace can extend a different preset and add its own overrides.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvashim%2Fbiome-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdvashim%2Fbiome-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvashim%2Fbiome-config/lists"}