{"id":19738,"library":"eslint-plugin-erasable-syntax-only","title":"eslint-plugin-erasable-syntax-only","description":"ESLint plugin to granularly enforce TypeScript's erasableSyntaxOnly flag. Current stable version 0.4.0. Requires Node.js >=20.18.0, ESLint >=9, @typescript-eslint/parser >=8, and TypeScript >=5. Differentiators: provides individual rules (enums, namespaces, parameter properties, import aliases) instead of a single blanket flag, enabling incremental adoption, editor suggestions, and type-aware enforcement. Recommended config includes all rules set to error. Active development with semver releases.","status":"active","version":"0.4.0","language":"javascript","source_language":"en","source_url":"https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only","tags":["javascript","typescript"],"install":[{"cmd":"npm install eslint-plugin-erasable-syntax-only","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-erasable-syntax-only","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-erasable-syntax-only","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required peer dependency for parsing TypeScript, >=8","package":"@typescript-eslint/parser","optional":false},{"reason":"Required peer dependency, ESLint >=9","package":"eslint","optional":false},{"reason":"Required peer dependency, TypeScript >=5","package":"typescript","optional":false}],"imports":[{"note":"ESM-only; requires Node.js >=20.18.0 and a bundler/module system that supports ESM. CommonJS require will fail.","wrong":"const erasableSyntaxOnly = require('eslint-plugin-erasable-syntax-only')","symbol":"default","correct":"import erasableSyntaxOnly from 'eslint-plugin-erasable-syntax-only'"},{"note":"Accessing configs via string key is also valid; both work.","wrong":"erasableSyntaxOnly.configs['recommended']","symbol":"erasableSyntaxOnly.configs.recommended","correct":"erasableSyntaxOnly.configs.recommended"},{"note":"When using eslintrc format (not recommended), plugin must be registered under the short name.","symbol":"plugins","correct":"plugins: { 'erasable-syntax-only': erasableSyntaxOnly }"}],"quickstart":{"code":"import eslint from '@eslint/js';\nimport erasableSyntaxOnly from 'eslint-plugin-erasable-syntax-only';\nimport tseslint from 'typescript-eslint';\n\nexport default tseslint.config(\n  eslint.configs.recommended,\n  tseslint.configs.recommended,\n  erasableSyntaxOnly.configs.recommended, // 👈\n);\n\n// Then run ESLint on your TypeScript files","lang":"typescript","description":"Shows how to add the plugin's recommended config to a flat ESLint configuration using typescript-eslint."},"warnings":[{"fix":"Update Node.js to version >=20.18.0.","message":"Requires Node.js >=20.18.0; earlier versions will fail.","severity":"breaking","affected_versions":"<20.18.0"},{"fix":"Upgrade ESLint to v9 or later, and migrate to flat config.","message":"Requires ESLint >=9 (flat config only); not compatible with ESLint 8 or eslintrc.","severity":"breaking","affected_versions":"<9"},{"fix":"Update to >=0.3.0 to include import-aliases and parameter-properties rules.","message":"v0.2.0 and earlier had minimal rule set; upgrade to latest for full feature set.","severity":"deprecated","affected_versions":"<0.3.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Convert your ESLint config to ESM (flat config) and use import syntax, or ensure your bundler supports ESM.","cause":"Package is ESM-only; CommonJS require is not allowed.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/eslint-plugin-erasable-syntax-only/dist/index.js from /path/to/.eslintrc.cjs not supported."},{"fix":"Run 'npm install eslint-plugin-erasable-syntax-only --save-dev' and ensure ESLint >=9.","cause":"Plugin not installed, or ESLint version too old.","error":"ESLint: Failed to load plugin 'erasable-syntax-only' declared in '.eslintrc.json': Cannot find module 'eslint-plugin-erasable-syntax-only'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}