{"id":19739,"library":"eslint-plugin-es","title":"eslint-plugin-es","description":"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.","status":"active","version":"4.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/mysticatea/eslint-plugin-es","tags":["javascript","eslint","plugin","eslintplugin"],"install":[{"cmd":"npm install eslint-plugin-es","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-es","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-es","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; the plugin works as an ESLint plugin","package":"eslint","optional":false}],"imports":[{"note":"CommonJS is default; ESM import may work depending on Node.js version and module resolution, but CJS is guaranteed.","wrong":"import plugin from 'eslint-plugin-es'","symbol":"plugin","correct":"const plugin = require('eslint-plugin-es')"},{"note":"Rules are exported directly on the plugin object, not from a subpath.","wrong":"const { rules } = require('eslint-plugin-es/rules')","symbol":"rules","correct":"const { rules } = require('eslint-plugin-es')"},{"note":"Configs are exported as a property of the plugin, not a separate module.","wrong":"const configs = require('eslint-plugin-es/configs')","symbol":"configs","correct":"const { configs } = require('eslint-plugin-es')"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  plugins: ['es'],\n  extends: ['eslint:recommended', 'plugin:es/no-new-in-es2020'],\n  rules: {\n    'es/no-for-of-loops': 'error',\n  },\n};","lang":"javascript","description":"Configures eslint-plugin-es with both a preset (es/no-new-in-es2020) and an individual rule (no-for-of-loops)."},"warnings":[{"fix":"Update config references: 'plugin:es/no-2018' → 'plugin:es/no-new-in-es2018' or 'plugin:es/restrict-to-es2018'.","message":"In 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.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Ensure Node.js version >= 8.10.0 (v4) or >= 6 (v1.x).","message":"In v2.0.0, dropped support for Node.js 6.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use individual rules from newer versions if finer control is needed; rule still works.","message":"The 'no-json-superset' rule is superseded by more granular rules in later versions.","severity":"deprecated","affected_versions":">=1.3.0"},{"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.","message":"This 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.","severity":"gotcha","affected_versions":"all"},{"fix":"Review rule documentation for fixability before relying on --fix.","message":"Some rules (like 'no-property-shorthands', 'no-trailing-function-commas') are fixable, but many are not. Autofix behavior may change in minor versions.","severity":"gotcha","affected_versions":">=1.4.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install eslint-plugin-es --save-dev'. Ensure it's in package.json devDependencies.","cause":"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.","error":"ESLint couldn't find the plugin \"es\"."},{"fix":"Use 'error' (string) or 2 (number) in config, e.g., 'es/no-for-of-loops': 'error'.","cause":"Misconfigured severity or inline comment syntax error; rule expects 'off' | 'warn' | 'error'.","error":"Configuration for rule \"es/no-for-of-loops\" is invalid: Value \"error\" is not a valid severity."},{"fix":"Check the rule list for your installed version. Run 'npm list eslint-plugin-es' and consult the documentation for available rules.","cause":"Older version (1.x) might not have the rule; or custom config refers to a rule that doesn't exist in current version.","error":"Definition for rule 'es/no-json-superset' was not found."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}