Registry / testing / eslint-plugin-es-x

eslint-plugin-es-x

JSON →
library9.6.0jsnpmunverified

ESLint plugin that disallows individual ECMAScript syntactic features from ES3 to upcoming proposals. Version 9.6.0 requires ESLint >=9.29.0 and Node.js ^20.19.0 || >=22.12.0. Actively maintained by eslint-community as a fork of the deprecated eslint-plugin-es. Provides 128+ granular rules to restrict specific syntax (e.g., BigInt, optional chaining, top-level await) with readable error messages. Ships TypeScript type declarations, flat config support, and predefined configs like 'no-new-in-es2023'. Unlike setting ecmaVersion in Espree, this plugin allows selective feature bans and gives clear feedback for restricted syntax.

npm install eslint-plugin-es-x
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-ES-X
E
eslint-plugin-es-x
testingjavascriptv9.6.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
import plugin from 'eslint-plugin-es-x'
const plugin = require('eslint-plugin-es-x')
Plugin is ESM-only since v9.0.0; CommonJS require() throws ERR_REQUIRE_ESM.
configs
import { configs } from 'eslint-plugin-es-x'
Named export for configs like configs['no-new-in-es2023'].
rules
import { rules } from 'eslint-plugin-es-x'
import { noBigInt } from 'eslint-plugin-es-x'
Individual rules are not exported; access via rules object, e.g., rules['es-x/no-bigint'].

Sets up eslint-plugin-es-x with flat config in an ESM project, forbidding BigInt and optional chaining.

import plugin from 'eslint-plugin-es-x'; export default [ { plugins: { 'es-x': plugin }, rules: { 'es-x/no-bigint': 'error', 'es-x/no-optional-chaining': 'error' } } ];
Debug
Known issues
breakingv9.0.0 drops support for ESLint <9.29.0 and Node.js <20.19.0.
fix
Upgrade ESLint to >=9.29.0 and Node.js to ^20.19.0 || >=22.12.0.
affects: >=8.0.0 <9.0.0
breakingv9.0.0 changes 'no-new-in-es2020' and 'restrict-to-es3' through 'restrict-to-es2019' configs – rules may be added or removed.
fix
Review updated configs and adjust rule overrides.
affects: >=8.0.0 <9.0.0
deprecatedLegacy .eslintrc configs are deprecated; use flat config (eslint.config.js) for ESLint >=9.
fix
Migrate to flat config format.
affects: >=9.0.0
gotchaPlugin rules are prefixed with 'es-x/', not 'esx/' or 'es2015/'.
fix
Use rule names like 'es-x/no-arrow-functions'.
affects: >=1.0.0
gotchaConfig names are under 'configs' export, not directly on plugin – e.g., plugin.configs['no-new-in-es2023'].
fix
Access configs via plugin.configs object.
affects: >=9.0.0
Errors
Common errors & fixes
Cannot find module 'eslint-plugin-es-x'
Package not installed or wrong import path.
fix
Run: npm install eslint-plugin-es-x --save-dev
Error [ERR_REQUIRE_ESM]: require() of ES Module
Using CommonJS require() with ESM-only package.
fix
Change to import statement: import plugin from 'eslint-plugin-es-x'
ESLint couldn't find the plugin 'es-x'
Flat config not configured correctly.
fix
Add to plugins object: import plugin from 'eslint-plugin-es-x'; export default [{ plugins: { 'es-x': plugin } }]
Definition for rule 'es-x/no-bigint' was not found
Typo in rule name or missing plugin registration.
fix
Ensure rule name is 'es-x/no-bigint' (not 'no-bigint') and plugin is registered.
Upgrade
Version history
9.6.0latest on npm
Audit
Dependencies
eslintrequiredPeer dependency: plugin requires ESLint >=9.29.0 (flat config only).
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-es-x — npm install eslint-plugin-es-x · libregistry