gitwtfhub

wtf is eslint-plugin-erasable-syntax-only?

joshuakgoldberg/eslint-plugin-erasable-syntax-only — explained in plain English

Analysis updated 2026-07-05 · repo last pushed 2026-07-01

51TypeScriptAudience · developerComplexity · 2/5ActiveSetup · easy

TL;DR

An ESLint plugin that flags TypeScript features incompatible with Node.js direct execution, like enums and namespaces, so teams can gradually migrate to running TypeScript without a build step.

Mindmap

mindmap
  root((repo))
    What it does
      Flags non-erasable TS
      Four separate rules
      Auto-fixes some issues
    Tech stack
      TypeScript
      ESLint
      Node.js
    Use cases
      Migrate to Node TS
      Gradual code cleanup
      Enforce erasable syntax
    Audience
      TS codebase teams
      Migration projects
    Setup
      ESLint 9 required
      Node 20.18 minimum

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Gradually migrate an existing TypeScript project to run directly in Node.js without a build step.

REASON 2

Identify and remove enums, namespaces, and other non-erasable TypeScript patterns one rule at a time.

REASON 3

Enforce erasable-syntax-only rules on specific files while excluding others during migration.

What's in the stack?

TypeScriptESLintNode.js

How it stacks up

joshuakgoldberg/eslint-plugin-erasable-syntax-onlyalexvilelabah/bah-browserthoughtfulllc/careerbot
Stars515151
LanguageTypeScriptTypeScriptTypeScript
Last pushed2026-07-01
MaintenanceActive
Setup difficultyeasyeasyeasy
Complexity2/52/52/5
Audiencedevelopervibe codergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Requires ESLint version 9 or higher and Node.js 20.18.0 or newer.

This project's license is not specified in the explanation, so its usage terms are unknown.

Wtf does this do

Node.js recently added the ability to run TypeScript files directly, without a separate compilation step. But there's a catch: Node can only handle "erasable" TypeScript code, meaning features that can be simply stripped away to leave plain JavaScript. Some TypeScript features, like enums, namespaces, and certain class parameter shortcuts, don't work this way and will cause errors. This ESLint plugin helps teams catch those problematic patterns in their code before they become a problem. The tool works as an add-on for ESLint, a popular code-checking utility. Once installed, it flags four specific TypeScript features that aren't erasable: enums, import aliases, namespaces, and class parameter properties. Some of these issues can even be auto-fixed by your editor. The plugin gives you four separate rules you can turn on individually rather than forcing an all-or-nothing switch. This is primarily for teams with an existing TypeScript codebase who want to migrate toward running their code directly through Node.js without a build step. If your project is large and uses enums or namespaces throughout, you can't just flip a switch, you'd have hundreds of errors at once. This plugin lets you tackle one rule at a time, exclude certain files temporarily, and add inline comments to suppress specific warnings where needed. It turns an overwhelming migration into a gradual cleanup. Notably, if you've already enabled TypeScript's own --erasableSyntaxOnly compiler flag, you don't need this plugin at all. The value here is the flexibility: TypeScript's flag is project-wide, while this plugin lets you be surgical about which rules apply where. The project requires ESLint version 9 or higher and Node.js 20.18.0 or newer.

Yoink these prompts

Prompt 1
Help me set up eslint-plugin-erasable-syntax-only in my ESLint config. I want to enable all four rules but exclude my test files for now.
Prompt 2
I'm getting ESLint errors from the erasable-syntax-only plugin about enums in my code. Show me how to replace a TypeScript enum with a plain object or union type so it works with Node.js direct execution.
Prompt 3
Generate an ESLint config that turns on only the no-enums rule from eslint-plugin-erasable-syntax-only, and add inline disable comments for the three files that still use enums heavily.

Frequently asked questions

wtf is eslint-plugin-erasable-syntax-only?

An ESLint plugin that flags TypeScript features incompatible with Node.js direct execution, like enums and namespaces, so teams can gradually migrate to running TypeScript without a build step.

What language is eslint-plugin-erasable-syntax-only written in?

Mainly TypeScript. The stack also includes TypeScript, ESLint, Node.js.

Is eslint-plugin-erasable-syntax-only actively maintained?

Active — commit in last 30 days (last push 2026-07-01).

What license does eslint-plugin-erasable-syntax-only use?

This project's license is not specified in the explanation, so its usage terms are unknown.

How hard is eslint-plugin-erasable-syntax-only to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is eslint-plugin-erasable-syntax-only for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.