{"id":19742,"library":"eslint-plugin-es5","title":"eslint-plugin-es5","description":"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.","status":"active","version":"1.5.0","language":"javascript","source_language":"en","source_url":"https://github.com/nkt/eslint-plugin-es5","tags":["javascript","eslint","eslintplugin","es5","es2015"],"install":[{"cmd":"npm install eslint-plugin-es5","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-es5","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-es5","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required for plugin to work","package":"eslint","optional":false}],"imports":[{"note":"Added to ESLint config under `plugins` key.","wrong":"ESLint config should use `plugins` array, not import","symbol":"plugin","correct":"plugins: ['es5']"},{"note":"Use string severity 'error' or 'warn', not numeric.","wrong":"'es5/no-arrow-functions': 2","symbol":"rules","correct":"'es5/no-arrow-functions': 'error'"},{"note":"Preset is accessed via `plugin:es5/no-es2015`, not direct name.","wrong":"extends: ['eslint:recommended', 'es5/no-es2015']","symbol":"preset","correct":"extends: ['plugin:es5/no-es2015']"}],"quickstart":{"code":"// .eslintrc.json\n{\n  \"plugins\": [\"es5\"],\n  \"rules\": {\n    \"es5/no-arrow-functions\": \"error\",\n    \"es5/no-template-literals\": \"warn\",\n    \"es5/no-block-scoping\": [\"error\", { \"let\": true, \"const\": true }]\n  }\n}\n\n// Or use preset to forbid all ES2015:\n{\n  \"extends\": [\"eslint:recommended\", \"plugin:es5/no-es2015\"],\n  \"rules\": {\n    \"es5/no-for-of\": \"error\"\n  }\n}","lang":"javascript","description":"Configures ESLint to use eslint-plugin-es5 with specific rules and a preset to enforce ES5 syntax."},"warnings":[{"fix":"Disable conflicting rules or ensure es5 rules are evaluated last.","message":"Rules may conflict with other ESLint rules that allow ES2015 features.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use TypeScript-specific plugins or parser options to enforce ES5.","message":"Plugin does not handle TypeScript or JSX - those parsers may allow ES2015 syntax even with plugin enabled.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider using `plugin:es5/no-es2016` for ES2016 restrictions or manually configure rules for later versions.","message":"Preset `plugin:es5/no-es2015` is still available but not updated for newer ES features beyond ES2016.","severity":"deprecated","affected_versions":"<1.5.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 --save-dev eslint-plugin-es5`","cause":"Plugin not installed or not in node_modules","error":"Error: Cannot find module 'eslint-plugin-es5'"},{"fix":"Use numeric severity: 'error' => 2 or use string in modern ESLint configs (check ESLint version)","cause":"Using string severity instead of numeric in some ESLint config contexts","error":"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\"')"},{"fix":"Use 'es5/no-block-scoping' with options or switch to individual rules if needed","cause":"Older versions had separate rules, but unified in this plugin","error":"Rule 'es5/no-block-scoping' has been deprecated and replaced by 'es5/no-const' and 'es5/no-let'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}