baseline-check
v1.1.0
Published

Readme
baseline-check (blc)

Lightweight CLI to scan a project for used web platform features and report their Baseline status (via web-features) with line number precision.
Quick start
- One-off (no install):
npx baseline-check- Install locally (dev):
npm install --save-dev baseline-check
npx baseline-check- Install globally:
npm install -g baseline-check
baseline-checkUsage examples
Default (scan project, show risky items with line numbers):
npx baseline-checkShow everything:
npx baseline-check --allShow newly available features:
npx baseline-check --newSummary only (summary implies --all):
npx baseline-check --summaryGroup by feature category:
npx baseline-check --groupJSON output for tooling integration:
npx baseline-check --jsonShow features baseline since a specific date:
npx baseline-check --since 2023-01-01Scan specific files/globs:
npx baseline-check src/**/*.css
Flags
--allShow all findings--newShow newly available features--warnings,-wShow warnings + newly available--summary,-sPrint summary counts and score (implies --all)--jsonOutput in JSON format for tooling--groupGroup findings by feature category (CSS, Grid, etc.)--since DATEShow features baseline since date (YYYY-MM-DD format)--limit NLimit printed items per file/group
Features
- Line-precise detection: Shows exact line numbers where features are used
- Multi-format support: Scans CSS, HTML, JavaScript/TypeScript files
- Inline code detection: Finds features in inline styles and script tags
- Feature grouping: Organize results by web platform categories
- Date filtering: Track baseline adoption trends over time
- JSON export: Machine-readable output for IDE and tooling integration
- Comprehensive coverage: Uses web-features data and compute-baseline
Output Examples
Standard Report
File: src/styles.css
─────────────────────────────────────────────
Feature Line Status Support
─────────────────────────────────────────────
Grid 3 ✅ Widely Baseline 2020-04-17
Subgrid 4 🟡 Newly Baseline 2023-09-15
word-break: auto-p 10 ❌ Not in chrome, chrome_android, edgeGrouped Report (--group)
Group: Grid
─────────────────────────────────────────────
Feature Line File Status Support
─────────────────────────────────────────────
Grid 3 styles.css ✅ Widely Baseline 2020-04-17
Subgrid 4 styles.css 🟡 Newly Baseline 2023-09-15Notes
- CLI names:
blcandbaseline-check(both point to the same binary) - The launcher strips a single
--automatically, so bothnpx . --summaryandnpx . -- --summarywork - Scanner ignores
node_modules,dist, and.gitby default - Set
BLC_DEBUG=1to print the resolved args for debugging:
$env:BLC_DEBUG=1; npx . --summaryPublishing / testing
- Preview publish contents:
npm pack --dry-run
npm publish --dry-runDev/test files (e.g.
debug-bcd.js,debug-parse-css.js,test-sample.css) are for local testing and should not be included in the published package. Thefilesfield inpackage.jsonrestricts published files.Publish a patch (recommended flow):
npm version patch -m "chore(release): %s"
npm publish --access public
git push && git push --tagsLicense
ISC
