Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/browserslist/lint

Linter for Browserslist config
https://github.com/browserslist/lint

Last synced: about 1 month ago
JSON representation

Linter for Browserslist config

Awesome Lists containing this project

README

        

# Browserslist Lint

Browserslist logo by Anton Popov

Check your [Browserslist](https://github.com/browserslist/browserslist/) config
with target browsers for popular mistakes.

```sh
npx browserslist-lint
```

Or try online: [`browsersl.ist`](https://browsersl.ist/)

Rules:

* `missedNotDead`: lack of `no dead` with queries like `last 2 versions`.
* `countryWasIgnored`: bad coverage in some country with >10M Internet users.
* `limitedBrowsers`: ignoring browsers diversity by calling only
a few browsers directly in config.
* `alreadyDead`: browser with `not` is already in `not dead` or `defaults`.


Sponsored by Evil Martians

## JS API

```js
import { lint } from 'browserslist-lint'

lint('defaults, not ie 11') // => [{
// id: 'alreadyDead',
// message: '`not ie 11` already in `defaults`'
// fixed: 'defaults'
// }]

// Without option with find Browserslist automatically
lint() // => [{ id, message, fixed }]
```