https://github.com/rainagain/eslint-plugin-ie-jsapi
jsapi in ie not support
https://github.com/rainagain/eslint-plugin-ie-jsapi
Last synced: 2 months ago
JSON representation
jsapi in ie not support
- Host: GitHub
- URL: https://github.com/rainagain/eslint-plugin-ie-jsapi
- Owner: rainAgain
- Created: 2018-06-20T09:10:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-22T07:07:34.000Z (almost 8 years ago)
- Last Synced: 2025-04-24T05:17:52.038Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# eslint-plugin-ie-jsapi
use to check ie jsapi
## Fork
forked from [rfeie/eslint-plugin-ie-static-methods](https://github.com/rfeie/eslint-plugin-ie-static-methods)
## Introduce
this package just add a part of js api in Es5.
you can fork this package then write the extra.js
## Installation
You'll first need to install [ESLint](http://eslint.org):
```
$ npm i eslint --save-dev
```
Next, install `eslint-plugin-ie-jsapi`:
```
$ npm install eslint-plugin-ie-jsapi --save-dev
```
**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-ie-jsapi` globally.
## Usage
Add `ie-jsapi` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
```json
{
"plugins": [
"ie-jsapi"
]
}
```
Then configure the rules you want to use under the rules section.
```json
{
"rules": {
"ie-jsapi/ie-jsapi": "error"
}
}
```
### Configuring
If you'd like to set specific methods to ignore due to polyfills you can add an
entry in your .eslintrc file. Using the settings objects and providing an array
of methods for each Object type. Example:
```js
// ...
"settings": {
"ieStaticMethodsAllow": {
// Ignore Object.assign and Number.parseFloat
"Object": ["assign"],
"Number": ["parseFloat"]
}
}
```
## Supported Rules
```
Extra: {
methods: ['forEach','isArray'], // add api
tips: {
// add error browser tip
"forEach": {
unsuportBrowser: 'IE 8,safari'
}
}
}
```
or in new version you can add js api in extra.js