baseline-guard-cli
v1.0.3
Published
CLI tool to scan codebases for non-Baseline web features
Maintainers
Readme
baseline-guard-cli
Scan your codebase for non-Baseline web features using the official web-features dataset.
Install
- npm i -g baseline-guard-cli
- Or per-project: npm i -D baseline-guard-cli
Quick start
- baseline-guard "src" --baseline 2025
- baseline-guard "src/**/*.ts" --format json | jq
Usage
- baseline-guard -h
- Usage: baseline-guard [options] <paths...>
- Scan codebase for non-Baseline web features
- Arguments:
- paths Paths or globs to scan
- Options:
- -V, --version output the version number
- -f, --format output format: text|json (default: "text")
- -b, --baseline Baseline year threshold (default: "2025")
- -i, --ignore <globs...> Globs to ignore from scanning (default: [])
- -h, --help display help for command
Examples
- Text output:
- baseline-guard ./src -b 2024
- JSON for CI:
- baseline-guard ./src --format json > baseline-report.json
- Multiple globs:
- baseline-guard "src" "lib" -i "/dist/" "**/*.test.ts"
- CSS/HTML scanning:
- baseline-guard "public" "styles" -b 2025
Exit codes
- 0: All features are Baseline-compatible
- 1: Unsupported features found
What’s included
- Scans JS/TS/JSX/TSX, CSS, and HTML
- Deduplicated findings, human-readable output
- Built for CI and local workflows
Related packages
- baseline-guard-core: shared logic and feature checking APIs
- eslint-plugin-baseline-guard: ESLint rule to warn while coding
Author
- Raiyan Siddique
Repository
- https://github.com/raiyansiddz/baseline-guard
License
- MIT
