Registry / testing / eslint-plugin-erasable-syntax-only

eslint-plugin-erasable-syntax-only

JSON →
library0.4.0jsnpmunverified

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.

npm install eslint-plugin-erasable-syntax-only
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-ERAS
E
eslint-plugin-erasable-syntax-only
testingjavascriptv0.4.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.

default
import erasableSyntaxOnly from 'eslint-plugin-erasable-syntax-only'
const erasableSyntaxOnly = require('eslint-plugin-erasable-syntax-only')
ESM-only; requires Node.js >=20.18.0 and a bundler/module system that supports ESM. CommonJS require will fail.
erasableSyntaxOnly.configs.recommended
erasableSyntaxOnly.configs.recommended
erasableSyntaxOnly.configs['recommended']
Accessing configs via string key is also valid; both work.
plugins
plugins: { 'erasable-syntax-only': erasableSyntaxOnly }
When using eslintrc format (not recommended), plugin must be registered under the short name.

Shows how to add the plugin's recommended config to a flat ESLint configuration using typescript-eslint.

import eslint from '@eslint/js'; import erasableSyntaxOnly from 'eslint-plugin-erasable-syntax-only'; import tseslint from 'typescript-eslint'; export default tseslint.config( eslint.configs.recommended, tseslint.configs.recommended, erasableSyntaxOnly.configs.recommended, // 👈 ); // Then run ESLint on your TypeScript files
Debug
Known issues
breakingRequires Node.js >=20.18.0; earlier versions will fail.
fix
Update Node.js to version >=20.18.0.
affects: <20.18.0
breakingRequires ESLint >=9 (flat config only); not compatible with ESLint 8 or eslintrc.
fix
Upgrade ESLint to v9 or later, and migrate to flat config.
affects: <9
deprecatedv0.2.0 and earlier had minimal rule set; upgrade to latest for full feature set.
fix
Update to >=0.3.0 to include import-aliases and parameter-properties rules.
affects: <0.3.0
Errors
Common errors & fixes
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.
Package is ESM-only; CommonJS require is not allowed.
fix
Convert your ESLint config to ESM (flat config) and use import syntax, or ensure your bundler supports ESM.
ESLint: Failed to load plugin 'erasable-syntax-only' declared in '.eslintrc.json': Cannot find module 'eslint-plugin-erasable-syntax-only'
Plugin not installed, or ESLint version too old.
fix
Run 'npm install eslint-plugin-erasable-syntax-only --save-dev' and ensure ESLint >=9.
Upgrade
Version history
0.4.0latest on npm
Audit
Dependencies
@typescript-eslint/parserrequiredRequired peer dependency for parsing TypeScript, >=8
eslintrequiredRequired peer dependency, ESLint >=9
typescriptrequiredRequired peer dependency, TypeScript >=5
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-erasable-syntax-only — npm install eslint-plugin-erasable-syntax-only · libregistry