0.1.2 • Published 3 years ago

eslint-plugin-native-ie v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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

RuleIE11IE10Disallowed grammer example
no-default-function-parametersfunction fn(param="default") {}
no-rest-parametersfunction fn(...rest) {}
no-spread-syntax-for-iterable-objectsvar a = [...[]];
no-object-literal-extensionsvar o = { foo: false, bar, hoge() {}, }
no-for-of-loopsfor (var _ of {}) {}
no-octal-and-binary-literalsvar o = 0o0755; var b = 0b0010;
no-template-literalsvar s = `hello ${name}`:
no-regexp-y-and-u-flagsvar y = /test/y; var u = /test/u;
no-destructingvar a, b, c = 1, 2, 3;
no-unicode-code-point-escapesvar u = "\u{1f4a9}";
no-new-targetfunction() { 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-functionsvar fn = () => {};
no-classclass C {}
no-superclass C { constructor() {super.foo()} }
no-generatorsfunction *g() {}

License

MIT

Author

yskszk63