- Notifications
You must be signed in to change notification settings - Fork18
ESLint plugin for ES5 users.
License
NotificationsYou must be signed in to change notification settings
nkt/eslint-plugin-es5
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
ESLint plugin for ES5 users.
Sometimes someone doesn't want to or can't use Babel.Even if you support modern browsers or node.js, JS engines have bugslike brokenblock-scoping.Maybe you only want to forbid usage offor-of
in your project.
If this concerns you, this plugin should help you.
npm install --save-dev eslint-plugin-es5
Add the plugin to your.eslintrc
:
{"plugins": ["es5" ]}
And then any of the ruleslisted below like this:
{"rules": {"es5/no-arrow-functions":"error" }}
Also you can extend one of presets:
{"extends": ["eslint:recommended","plugin:es5/no-es2015" ]}
Available presets:
plugin:es5/no-es2015
: Forbid ES2015 usage.plugin:es5/no-es2016
: Forbid ES2016 usage.
es5/no-es6-methods
Forbid ES2015methods forArray
andString
es5/no-es6-static-methods
Forbid ES2015static methods forArray
,Math
,Number
, andObject
. You can enable specific functions:"es5/no-es6-static-methods": ["error", { exceptMethods: ["Math.imul"] }]
es5/no-arrow-functions
🔧: Forbidarrow-functions.es5/no-binary-and-octal-literals
🔧: Forbidbinary and octal literals.es5/no-block-scoping
: Forbidlet
andconst
declarations. You can enable them using options:"es5/no-block-scoping": ["error", { "let": true }]
es5/no-classes
: ForbidES2015 classes.es5/no-computed-properties
: Forbidcomputed properties.es5/no-default-parameters
: Forbiddefault parameters.es5/no-destructuring
🔧: Forbiddestructuring statements.es5/no-exponentiation-operator
: Forbid exponentiation operatora ** b
usage.es5/no-for-of
: Forbidfor-of
statements.es5/no-generators
: Forbidgenerators usage.es5/no-modules
: Forbid ES2015modules usage.es5/no-object-super
: Forbidsuper
/super.foo()
calls.es5/no-rest-parameters
: Forbidrest parameters.es5/no-shorthand-properties
🔧: Forbidshorthand properties.es5/no-spread
🔧: Forbid...spread expressions.es5/no-template-literals
🔧: Forbidtemplate strings usage.es5/no-typeof-symbol
: Forbidtypeof foo === 'symbol'
checks.es5/no-unicode-code-point-escape
🔧: ForbidUnicode support in code point escape.es5/no-unicode-regex
: ForbidUnicode support in RegExp.
About
ESLint plugin for ES5 users.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors10
Uh oh!
There was an error while loading.Please reload this page.