react-router-xray
v2.0.1
Published
CLI for static analysis and reporting of React Router route trees.
Maintainers
Readme
react-router-xray
CLI for static analysis and reporting of React Router route trees.
Install
npm install -D react-router-xrayUsage
xray routes
xray analyze
xray check --fail-on error
xray report --openConfig
Create xray.config.json in your project root:
{
"routerFile": "src/router.tsx",
"rules": {
"missingErrorBoundary": "error",
"deepNesting": { "level": "warn", "maxDepth": 4 },
"duplicatePath": "error"
},
"thresholds": { "maxComplexityScore": 60 }
}Notes
Prebuilt binaries are provided for Linux, macOS, and Windows. Rust is not required to consume the published package.
License
MIT
