
Research
Node.js Fixes AsyncLocalStorage Crash Bug That Could Take Down Production Servers
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.
@projectsophon/eslint-plugin-typescript-enum
Advanced tools
ESLint rules for TypeScript enums.
From TypeScript Handbook on Enums:
Enums are one of the few features TypeScript has which is not a type-level extension of JavaScript.
In other words, TypeScript enums have their corresponsing runtime representations, they are not erased from your emitted JavaScript files after being compiled. This conflicts with one of the TypeScript Design Non-goals:
Provide additional runtime functionality or libraries. Instead, use TypeScript to describe existing libraries.
Having this TypeScript feature extending into your compiled JavaScript also conflicts with the TypeScript slogan of being a typed superset of JavaScript, which further introduces vendor lock-in.
Orta Therox from Typescript team mentioned in one of his YouTube videos that the TypeScript team actually regrets some of the changes it made in the beginning, including introducing enums which basically add features to JavaScript.
Moreover, using enums in TypeScript has a lot of caveats and edge cases to keep in mind. Some aspects of it are even considered not type safe!!! Head over to these wonderful articles for more details on these issues:
Additionally, if you have been using @babel/plugin-transform-typescript, you might have already noticed that one of the important caveats is to avoid using const enums, as those require type information to compile.
Nonetheless, TypeScript is undoubtedly a very fantastic programming language with an extremely powerful type system. Enums may have been a very good feature to have back in the early days (2011) when good alternatives did not yet exist.
We now already have much better alternatives than enums, such as const assertions, string unions, discriminated union, etc. Which is why I created this ESLint plugin to provide you with some handy configs and rules to disallow the use of TypeScript enums.
This article provides a very in-depth exploration on the alternatives to TypeScript enums:
First, install the peer dependencies:
npm install --save-dev eslint typescript @typescript-eslint/parser
Next, install this package:
npm install --save-dev eslint-plugin-typescript-enum
Configure this plugin in your ESLint configuration file (.eslintrc.js), this will disallow the use of enums altogether:
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["typescript-enum"],
extends: ["plugin:typescript-enum/recommended"],
};
If you are using @babel/plugin-transform-typescript and want to allow the general use of enums except const enums:
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["typescript-enum"],
extends: ["plugin:typescript-enum/babel"],
};
Key: :heavy_check_mark: = recommended, :wrench: = fixable, :thought_balloon: = requires type information
| Name | Description | :heavy_check_mark: | :wrench: | :thought_balloon: |
|---|---|---|---|---|
typescript-enum/no-const-enum | Disallow the use of const enums | |||
typescript-enum/no-enum | Disallow the use of all enums | :heavy_check_mark: |
Feel free to suggest new configs and rules, PRs are also welcomed!
FAQs
ESLint rules for TypeScript enums.
We found that @projectsophon/eslint-plugin-typescript-enum demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.