Skip to main content

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-only to 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.json is 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

baseline_warden-0.1.1.tar.gz (38.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

baseline_warden-0.1.1-py3-none-any.whl (34.9 kB view details)

Uploaded Python 3

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

Hashes for baseline_warden-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5e88fccec54c0d7c68cddbb6551ff50d6169a67c32891f3d83d86561fd0e9726
MD5 ca70a3f0697bb114048b55418c0649a2
BLAKE2b-256 cdbcc0e8851a66b90d023e26c898032706e91f91176aba73c5a4c6a631f53453

See more details on using hashes here.

Provenance

The following attestation bundles were made for baseline_warden-0.1.1.tar.gz:

Publisher: release.yml on Mockapapella/baseline-warden

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file baseline_warden-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for baseline_warden-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3b911f2e8ecde4da24198f85afd4836bf0560067070d63afd720f232898dab67
MD5 6ed2e87ce605a11fd0d640f74f68d33c
BLAKE2b-256 0f9a3970a66f6b6485870eb7190134956eab8c7e9e9612d169a2de0112faa535

See more details on using hashes here.

Provenance

The following attestation bundles were made for baseline_warden-0.1.1-py3-none-any.whl:

Publisher: release.yml on Mockapapella/baseline-warden

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page