biome-plugin-solid-router

raw JSON →
0.2.0 verified Fri May 01 auth: no javascript

A Biome GritQL plugin providing lint rules for @solidjs/router, catching common API mistakes from React Router muscle memory at lint time. Current stable version is 0.2.0, released with OIDC trusted publishing. The plugin's five rules (solid-router-no-link-component, solid-router-no-to-prop, solid-router-no-initial-entries, solid-router-no-routes-wrapper, solid-router-no-element-prop) identify wrong imports, props, and usage patterns. Requires Biome >= 2.0.0 and works via GritQL AST matching. Unlike TypeScript- or ESLint-based solutions, it catches mistakes without type information, but for full type-aware linting should be combined with eslint-plugin-solid.

error Biome configuration error: Plugin not found: biome-plugin-solid-router
cause Biome version < 2.0.0 does not support GritQL plugins.
fix
Update @biomejs/biome to >= 2.0.0 (npm install -D @biomejs/biome@latest).
error Error: Cannot find module './node_modules/biome-plugin-solid-router/rules/solid-router-no-link-component.grit'
cause Typo in file path or rule file missing (single rule reference mistake).
fix
Verify the file exists in node_modules/biome-plugin-solid-router/rules/ and the path is correct. Use the package name instead: "biome-plugin-solid-router".
breaking Plugin requires Biome >= 2.0.0; older Biome versions do not support GritQL plugins.
fix Upgrade Biome to 2.0.0 or later (npm update @biomejs/biome).
gotcha Rules only apply to imports from @solidjs/router; importing Link from other packages (e.g., lucide-solid) is not flagged.
fix No fix needed — intended behavior. But be aware that false negatives can occur if router components are re-exported under a different name.
gotcha GritQL rules cannot detect type-level mistakes (e.g., passing JSX to component= prop, route param mismatches). For those, use eslint-plugin-solid alongside.
fix Add eslint-plugin-solid to your linting setup for full type-aware linting.
deprecated In v0.1.1, referencing the plugin by file path in biome.json still works but the package-name reference (biome-plugin-solid-router) is preferred since v0.2.0.
fix Use { "plugins": ["biome-plugin-solid-router"] } in biome.json.
npm install biome-plugin-solid-router
yarn add biome-plugin-solid-router
pnpm add biome-plugin-solid-router

Shows how to install and enable biome-plugin-solid-router in biome.json, registering all five lint rules for @solidjs/router.

{
  "plugins": ["biome-plugin-solid-router"]
}