Skip to content

This is a plugin for eslint that checks the grammar of es6, which does not work with Internet explorer.

License

Notifications You must be signed in to change notification settings

yskszk63/eslint-plugin-native-ie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-native-ie

npm version

This is a plugin for eslint that checks the grammar of es6, which does not work with Internet explorer.

Example

package.json

{
...
  "devDependencies": {
    "eslint": "^8.1.0",
    "eslint-plugin-native-ie": "^0.1.0"
  },
...
}

.eslitrc.json (for ie11)

{
  "extends": ["plugin:native-ie/ie11"]
}

.eslitrc.json (for ie10)

{
  "extends": ["plugin:native-ie/ie10"]
}

Rules

Rule IE11 IE10 Disallowed grammer example
no-default-function-parameters
function fn(param="default") {}
no-rest-parameters
function fn(...rest) {}
no-spread-syntax-for-iterable-objects
var a = [...[]];
no-object-literal-extensions
var o = { [foo]: false, bar, hoge() {}, }
no-for-of-loops
for (var _ of {}) {}
no-octal-and-binary-literals
var o = 0o0755; var b = 0b0010;
no-template-literals
var s = `hello ${name}`:
no-regexp-y-and-u-flags
var y = /test/y; var u = /test/u;
no-destructing
var [a, b, c] = [1, 2, 3];
no-unicode-code-point-escapes
var u = "\u{1f4a9}";
no-new-target
function() { new.target === C }
no-const -
const c = null;
no-let -
let l = null;
no-const-in-for-in-loop -
for (const _ in {}) {}
no-let-in-for-in-loop -
for (let _ in {}) {}
no-arrow-functions
var fn = () => {};
no-class
class C {}
no-super
class C { constructor() {super.foo()} }
no-generators
function *g() {}

License

MIT

Author

yskszk63

About

This is a plugin for eslint that checks the grammar of es6, which does not work with Internet explorer.

Topics

Resources

License

Stars

Watchers

Forks