# browser-compatibility-checker

> Checks compatibility of your HTML/CSS/JS with modern browsers. Uses MDN compatibility data to check for deprecated/mixed-support features.

Latest version **1.1.2** (published 2024-07-22) · 0 weekly downloads

## Install

```sh
npm install browser-compatibility-checker
pnpm add browser-compatibility-checker
yarn add browser-compatibility-checker
bun add browser-compatibility-checker
```

Provides the command `browser-compatibility-checker`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2024-07-22 |
| First published | 2024-02-08 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 330.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | benjamino64 |
| Keywords | browser compatibility, browser, code analysis, linting, mdn, browser-compat-data, compatibility, checker, browserslist, caniuse |

## Links

- npm: https://www.npmjs.com/package/browser-compatibility-checker
- Repository: https://github.com/BenAAndrew/browser-compatibility-checker
- Homepage: https://github.com/BenAAndrew/browser-compatibility-checker#readme
- Issues: https://github.com/BenAAndrew/browser-compatibility-checker/issues
- npm.io page: https://npm.io/package/browser-compatibility-checker

## Dependencies (5)

- [kleur](https://npm.io/package/kleur.md) ^4.1.5
- [commander](https://npm.io/package/commander.md) ^12.0.0
- [minimatch](https://npm.io/package/minimatch.md) ^9.0.3
- [browserslist](https://npm.io/package/browserslist.md) ^4.23.2
- [@mdn/browser-compat-data](https://npm.io/package/@mdn/browser-compat-data.md) ^5.5.8

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2024-07-22
- 1.1.1 — 2024-02-12
- 1.1.0 — 2024-02-12
- 1.0.4 — 2024-02-12
- 1.0.0 — 2024-02-08

## README

# Browser compatibility checker

A tool for analyzing frontend code to find browser compatibility issues powered by [MDN compatibility data](https://developer.mozilla.org/en-US/)

- Scans HTML, CSS & JS files for compatibility issues
- Reports both deprecated & mixed-support features
- Supports configuration of target browsers (including browserslist)

## VSCode Extension

![](preview.gif)

### Extension Settings

- `browser-compatibility-checker.enableOnChange`: Enable this extension on start and file change
- `browser-compatibility-checker.useError`: Use a severity of 'Error' for each problem (otherwise uses 'Warning')
- `browser-compatibility-checker.browserList`: Which browsers to check compatibility for (defaults to all MDN recognised browsers)
- `browser-compatibility-checker.warnForOtherBrowsers`: Show a warning for issues with browsers not in the browser list
- `browser-compatibility-checker.foldersToIgnore`: Glob paths to exclude from scanning

## CLI Tool

1. `npm i -g browser-compatibility-checker`
2. `npx browser-compatibility-checker`

### Arguments

- **-f, --folder**: Folder path to scan
- **-b, --browsers**: Comma seperated list of browsers to check (defaults to all)
- **-i, --ignore**: Comma seperated list of glob paths to ignore

## Local development

### Installation

1. `npm install`
2. `npm run watch`
3. Run:
   - **VSCode extension**: Open VSCode & press F5 to run the extension
   - **CLI tool**: `npm i -g`, then run with `browser-compatibility-checker`

## Disclaimer

This tool is not a replacement for cross-browser testing and cannot verify how elements will perform on various browsers.
Elements which are not flagged as incompatible may still have issues on some browsers.

---
_Source: https://npm.io/package/browser-compatibility-checker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
