Baseline compatibility gate for web projects
Project description
baseline-warden
Pre-commit/CI guardrail for Baseline support in HTML/CSS. Scans your code, maps features to Web Baseline (Web Status + MDN BCD), and flags anything not widely/newly available.
Quick start
Install uv (one‑liner):
curl -LsSf https://astral.sh/uv/install.sh | sh
Install Baseline Warden from PyPI with uv and scan:
uv venv .venv && source .venv/bin/activate
uv pip install baseline-warden
bw sync --lock # build a Baseline snapshot
bw scan --out console,json # fails on limited; warns on unknown
# Tip: add --summary-only for compact console output
Supported Python versions: 3.11, 3.12, and 3.13. The example workflows use Python 3.13, and CI tests all three.
What it checks
- Files: .html/.htm/.jinja/.jinja2 and .css (others ignored)
- Findings: Baseline status per BCD key (widely/newly/limited/unknown)
- Outputs: console (use
--summary-onlyto keep it brief),report.json, GitHub annotations - Noise control: ignores global HTML attrs (class/id/aria-*), custom property declarations (
--foo), descriptor-only at‑rules (@font-face/@counter-style/@page); falls back value→property when helpful
Integrations
- Pre-commit (blocking by default):
- repo: local hooks: - id: baseline-warden name: baseline-warden entry: bw scan --out console --summary-only --config baseline-warden.toml language: system files: '\\.(html|htm|jinja|jinja2|css)$'
GitHub Actions (minimal working example):
name: Baseline Warden
on:
pull_request:
push:
branches:
- main
jobs:
baseline:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install uv
run: pip install uv
- name: Sync dependencies
run: uv sync --locked
- name: Run Baseline scan
run: uv run bw scan --out console --ci
- Ensure
baseline.lock.jsonis committed (recommended). If you prefer to build it in CI, add a step before the scan:uv run bw sync --lock.
Configuration
Defaults usually “just work” for common layouts. For full options and examples, see the Configuration guide: docs/CONFIG.md.
Contributing
See the contributing guide: CONTRIBUTING.md for developer setup and guidelines.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file baseline_warden-0.1.1.tar.gz.
File metadata
- Download URL: baseline_warden-0.1.1.tar.gz
- Upload date:
- Size: 38.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e88fccec54c0d7c68cddbb6551ff50d6169a67c32891f3d83d86561fd0e9726
|
|
| MD5 |
ca70a3f0697bb114048b55418c0649a2
|
|
| BLAKE2b-256 |
cdbcc0e8851a66b90d023e26c898032706e91f91176aba73c5a4c6a631f53453
|
Provenance
The following attestation bundles were made for baseline_warden-0.1.1.tar.gz:
Publisher:
release.yml on Mockapapella/baseline-warden
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
baseline_warden-0.1.1.tar.gz -
Subject digest:
5e88fccec54c0d7c68cddbb6551ff50d6169a67c32891f3d83d86561fd0e9726 - Sigstore transparency entry: 584739627
- Sigstore integration time:
-
Permalink:
Mockapapella/baseline-warden@1df9c1800ffde5b18c02013447a078ccae803efc -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Mockapapella
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1df9c1800ffde5b18c02013447a078ccae803efc -
Trigger Event:
push
-
Statement type:
File details
Details for the file baseline_warden-0.1.1-py3-none-any.whl.
File metadata
- Download URL: baseline_warden-0.1.1-py3-none-any.whl
- Upload date:
- Size: 34.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b911f2e8ecde4da24198f85afd4836bf0560067070d63afd720f232898dab67
|
|
| MD5 |
6ed2e87ce605a11fd0d640f74f68d33c
|
|
| BLAKE2b-256 |
0f9a3970a66f6b6485870eb7190134956eab8c7e9e9612d169a2de0112faa535
|
Provenance
The following attestation bundles were made for baseline_warden-0.1.1-py3-none-any.whl:
Publisher:
release.yml on Mockapapella/baseline-warden
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
baseline_warden-0.1.1-py3-none-any.whl -
Subject digest:
3b911f2e8ecde4da24198f85afd4836bf0560067070d63afd720f232898dab67 - Sigstore transparency entry: 584739630
- Sigstore integration time:
-
Permalink:
Mockapapella/baseline-warden@1df9c1800ffde5b18c02013447a078ccae803efc -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Mockapapella
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1df9c1800ffde5b18c02013447a078ccae803efc -
Trigger Event:
push
-
Statement type: