Awesome
eslint-plugin-typescript-compat-dom
- Lints the compatibilities between browsers DOM APIs.
- refers mdn-browser-compat-data, TypeScript Compiler API, and browserslist.
- inspired by eslint-plugin-compat.
- eslint-plugin-compat aims to JavaScript, while this plugin aims to TypeScript.
- <b>This plugin is under development. DO NOT USE IN YOUR PRODUCTION.</b>
Installation
$ npm i eslint eslint typescript @typescript-eslint/parser --save-dev
Usage
Specify the parser in you .eslintrc.
{
"parser": "@typescript-eslint/parser"
}
Set plugins and rules.
{
"plugins": ["typescript-compat-dom"],
"rules": {
"typescript-compat-dom/compat-dom": ["error", {
"browserslist": ["ie 11"]
}]
}
}
LICENCE
MIT