amilajack / amilajack/eslint-plugin-compat
Some js methods not supported on IE 11
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Description
### Problem
- It seems like support for IE 11 does not work on some function such as
`[].includes()` , `"strsd".includes()`
- only fetch works in this case
> How to solve this problem and are their workarounds ?
Thanks 👍



### Code
`packge.json`
```json
{
"name": "testproject",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"eslint": "^7.17.0",
"eslint-plugin-compat": "^3.9.0"
}
}
```
`test.js`
```
// IE 11 No Support
Array.includes();
Array.from(Set(1,2,3));
[3,2,1].includes(1);
"asdasd".includes("a");
fetch('asdasd');
```
`.eslintrc.js`
```js
module.exports = {
"env": {
"browser": true,
"es2020": true
},
"settings": {
targets: [
"ie >= 11"
],
polyfills: [],
},
"extends": [ ],
"plugins": [ "compat" ],
"rules": {
"compat/compat": "error"
}
};
```
Contributor guide
Assessment
This issue has not been assessed yet.