Registry / testing / eslint-plugin-es

eslint-plugin-es

JSON →
library4.1.0jsnpmunverified

ESLint plugin that disallows specific ECMAScript syntactic features individually, providing readable error messages (e.g., 'ES2020 BigInt is forbidden') instead of Espree's generic 'unexpected token'. Current stable version 4.1.0 (released 2021-09-12). Released under semantic versioning: minor versions add rules for newly stage-4 proposals, major versions update configs for new ECMAScript snapshots. Key differentiator: granular control over every ES feature with per-rule disabling/enabling, plus presets like 'es/no-new-in-es2020' and 'es/restrict-to-es2020'. Requires eslint >= 4.19.1.

npm install eslint-plugin-es
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-ES
E
eslint-plugin-es
testingjavascriptv4.1.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
const plugin = require('eslint-plugin-es')
import plugin from 'eslint-plugin-es'
CommonJS is default; ESM import may work depending on Node.js version and module resolution, but CJS is guaranteed.
rules
const { rules } = require('eslint-plugin-es')
const { rules } = require('eslint-plugin-es/rules')
Rules are exported directly on the plugin object, not from a subpath.
configs
const { configs } = require('eslint-plugin-es')
const configs = require('eslint-plugin-es/configs')
Configs are exported as a property of the plugin, not a separate module.

Configures eslint-plugin-es with both a preset (es/no-new-in-es2020) and an individual rule (no-for-of-loops).

// .eslintrc.js module.exports = { plugins: ['es'], extends: ['eslint:recommended', 'plugin:es/no-new-in-es2020'], rules: { 'es/no-for-of-loops': 'error', }, };
Debug
Known issues
breakingIn v4.0.0, configs were renamed from 'plugin:es/no-<year>' (e.g., 'plugin:es/no-2018') to 'plugin:es/no-new-in-es<year>' and 'plugin:es/restrict-to-es<year>'. Old config names are removed.
fix
Update config references: 'plugin:es/no-2018' → 'plugin:es/no-new-in-es2018' or 'plugin:es/restrict-to-es2018'.
affects: >=4.0.0
breakingIn v2.0.0, dropped support for Node.js 6.
fix
Ensure Node.js version >= 8.10.0 (v4) or >= 6 (v1.x).
affects: >=2.0.0
deprecatedThe 'no-json-superset' rule is superseded by more granular rules in later versions.
fix
Use individual rules from newer versions if finer control is needed; rule still works.
affects: >=1.3.0
gotchaThis plugin only disallows syntactic features; it does not check built-in objects or methods (e.g., Array.from). Use eslint-plugin-es-x for that.
fix
If you need to disallow ES built-in methods, consider using eslint-plugin-es-x (a fork with extended rules) or no-restricted-globals.
affects: all
gotchaSome rules (like 'no-property-shorthands', 'no-trailing-function-commas') are fixable, but many are not. Autofix behavior may change in minor versions.
fix
Review rule documentation for fixability before relying on --fix.
affects: >=1.4.0
Errors
Common errors & fixes
ESLint couldn't find the plugin "es".
The plugin package name is 'eslint-plugin-es', but it provides 'es' as the plugin name. ESLint expects node_modules/eslint-plugin-es to exist.
fix
Run 'npm install eslint-plugin-es --save-dev'. Ensure it's in package.json devDependencies.
Configuration for rule "es/no-for-of-loops" is invalid: Value "error" is not a valid severity.
Misconfigured severity or inline comment syntax error; rule expects 'off' | 'warn' | 'error'.
fix
Use 'error' (string) or 2 (number) in config, e.g., 'es/no-for-of-loops': 'error'.
Definition for rule 'es/no-json-superset' was not found.
Older version (1.x) might not have the rule; or custom config refers to a rule that doesn't exist in current version.
fix
Check the rule list for your installed version. Run 'npm list eslint-plugin-es' and consult the documentation for available rules.
Upgrade
Version history
4.1.0latest on npm
Audit
Dependencies
eslintrequiredpeer dependency; the plugin works as an ESLint plugin
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-es — npm install eslint-plugin-es · libregistry