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.

testing
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.

CommonJS is default; ESM import may work depending on Node.js version and module resolution, but CJS is guaranteed.

const plugin = require('eslint-plugin-es')

Rules are exported directly on the plugin object, not from a subpath.

const { rules } = require('eslint-plugin-es')

Configs are exported as a property of the plugin, not a separate module.

const { configs } = require('eslint-plugin-es')

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 footguns
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.
breakingIn v2.0.0, dropped support for Node.js 6.
deprecatedThe 'no-json-superset' rule is superseded by more granular rules in later versions.
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.
gotchaSome rules (like 'no-property-shorthands', 'no-trailing-function-commas') are fixable, but many are not. Autofix behavior may change in minor versions.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
9 hits · last 30 days
gptbot
4
ahrefsbot
4
script
1
Resources