Registry / testing / biome-plugin-solid-router

biome-plugin-solid-router

JSON →
library0.2.0jsnpmunverified

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.

npm install biome-plugin-solid-router
INSTALL
IMPORT
SIG · BIOME-PLUGIN-SOLID
B
biome-plugin-solid-router
testingjavascriptv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plugin
// Add to biome.json: { "plugins": ["biome-plugin-solid-router"] }
// Wrong: referencing a file path (use plugin name in biome.json) { "plugins": ["./node_modules/biome-plugin-solid-router/index.grit"] }
Since v0.2.0, you can reference the plugin by npm package name; no additional import statements are needed.
individual rule
// In biome.json: { "plugins": ["./node_modules/biome-plugin-solid-router/rules/solid-router-no-link-component.grit"] }
// Wrong: trying to import via require or import statement const rule = require('biome-plugin-solid-router/rules/solid-router-no-link-component');
Individual rules are referenced by file path to the .grit file in biome.json plugins array.
all rules
// In biome.json: { "plugins": ["biome-plugin-solid-router"] }
// Wrong: using an import from the package in JS/TS code import 'biome-plugin-solid-router';
The plugin is configured via biome.json, not imported in source code.

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"] }
Debug
Known issues
breakingPlugin 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).
affects: <2.0.0
gotchaRules 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.
affects: >=0.0.0
gotchaGritQL 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.
affects: >=0.0.0
deprecatedIn 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.
affects: >=0.2.0
Errors
Common errors & fixes
Biome configuration error: Plugin not found: biome-plugin-solid-router
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: Cannot find module './node_modules/biome-plugin-solid-router/rules/solid-router-no-link-component.grit'
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".
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies
@biomejs/biomerequiredPeer dependency: GritQL plugin support requires Biome >= 2.0.0
Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources