Registry / testing / eslint-plugin-es5

eslint-plugin-es5

JSON →
library1.5.0jsnpmunverified

ESLint plugin that enforces ES5-only code by forbidding ES2015+ syntax. Version 1.5.0 (stable, no recent updates). Maintains a comprehensive set of rules covering arrow functions, classes, destructuring, modules, generators, and more. Includes fixable rules for many features. Unlike similar plugins, provides preset configurations like `plugin:es5/no-es2015` to ban all ES2015 features at once. Requires ESLint >=3.

npm install eslint-plugin-es5
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-ES5
E
eslint-plugin-es5
testingjavascriptv1.5.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plugin
plugins: ['es5']
ESLint config should use `plugins` array, not import
Added to ESLint config under `plugins` key.
rules
'es5/no-arrow-functions': 'error'
'es5/no-arrow-functions': 2
Use string severity 'error' or 'warn', not numeric.
preset
extends: ['plugin:es5/no-es2015']
extends: ['eslint:recommended', 'es5/no-es2015']
Preset is accessed via `plugin:es5/no-es2015`, not direct name.

Configures ESLint to use eslint-plugin-es5 with specific rules and a preset to enforce ES5 syntax.

// .eslintrc.json { "plugins": ["es5"], "rules": { "es5/no-arrow-functions": "error", "es5/no-template-literals": "warn", "es5/no-block-scoping": ["error", { "let": true, "const": true }] } } // Or use preset to forbid all ES2015: { "extends": ["eslint:recommended", "plugin:es5/no-es2015"], "rules": { "es5/no-for-of": "error" } }
Debug
Known issues
gotchaRules may conflict with other ESLint rules that allow ES2015 features.
fix
Disable conflicting rules or ensure es5 rules are evaluated last.
affects: >=1.0.0
gotchaPlugin does not handle TypeScript or JSX - those parsers may allow ES2015 syntax even with plugin enabled.
fix
Use TypeScript-specific plugins or parser options to enforce ES5.
affects: >=1.0.0
deprecatedPreset `plugin:es5/no-es2015` is still available but not updated for newer ES features beyond ES2016.
fix
Consider using `plugin:es5/no-es2016` for ES2016 restrictions or manually configure rules for later versions.
affects: <1.5.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-plugin-es5'
Plugin not installed or not in node_modules
fix
Run `npm install --save-dev eslint-plugin-es5`
Configuration for rule "es5/no-arrow-functions" is invalid: Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '"error"')
Using string severity instead of numeric in some ESLint config contexts
fix
Use numeric severity: 'error' => 2 or use string in modern ESLint configs (check ESLint version)
Rule 'es5/no-block-scoping' has been deprecated and replaced by 'es5/no-const' and 'es5/no-let'
Older versions had separate rules, but unified in this plugin
fix
Use 'es5/no-block-scoping' with options or switch to individual rules if needed
Upgrade
Version history
1.5.0latest on npm
Audit
Dependencies
eslintrequiredPeer dependency required for plugin to work
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-es5 — npm install eslint-plugin-es5 · libregistry