amilajack / amilajack/eslint-plugin-compat

Config eslintrc file to compatible with IE9

Open
#396 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.2k
Forks
115
PR merge metrics
No merged PRs in 30d

Description

I want to use this plugin to check if my code is compatible with IE9. But I can't see any errors even if I put some arrow function in the code, see below example

Define `"browserslist": ["ie 9"]` in file `package.json`, and run command `npx eslint index.js` with below files
Config file `.eslintrc.json`
```
{
"env": {
"browser": true,
"es6": true
},
"plugins": ["compat"],
"rules": {
"compat/compat": "error"
}
}
```
Code file `index.js`:
```
var bar = () => {
return "hello arrow function";
};
```

I can't see any error or warning from console, did I config something wrong? Please give me some advise.

Thanks a lot~

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.