Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/hitode909/eslint-plugin-typescript-compat-dom

Uses mdn-browser-compat-data, browserslist, TypeScript Compiler API and lints compatibilities between browsers DOM APIs.
https://github.com/hitode909/eslint-plugin-typescript-compat-dom

Last synced: 3 months ago
JSON representation

Uses mdn-browser-compat-data, browserslist, TypeScript Compiler API and lints compatibilities between browsers DOM APIs.

Awesome Lists containing this project

README

        

# eslint-plugin-typescript-compat-dom

- Lints the compatibilities between browsers DOM APIs.
- refers [mdn\-browser\-compat\-data](https://www.npmjs.com/package/mdn-browser-compat-data), TypeScript Compiler API, and browserslist.
- inspired by [eslint\-plugin\-compat](https://www.npmjs.com/package/eslint-plugin-compat).
- eslint-plugin-compat aims to JavaScript, while this plugin aims to TypeScript.
- This plugin is under development. DO NOT USE IN YOUR PRODUCTION.

screenshot

## Installation

```
$ npm i eslint eslint typescript @typescript-eslint/parser --save-dev
```

## Usage

Specify the parser in you .eslintrc.

```json
{
"parser": "@typescript-eslint/parser"
}
```

Set plugins and rules.

```json
{
"plugins": ["typescript-compat-dom"],

"rules": {
"typescript-compat-dom/compat-dom": ["error", {
"browserslist": ["ie 11"]
}]
}
}
```

## LICENCE

MIT