ESLint configuration for JavaScript using stripped types, without TypeScript runtime features
Warning
This package will be deprecated in favor of
the --erasableSyntaxOnly
option in TypeScript 5.8.
If you're not already using eslint-config-types
, I recommend trying out
TypeScript 5.8 beta
instead.
npm install --save-dev eslint eslint-config-types
pnpm install --save-dev eslint eslint-config-types
yarn add --dev eslint eslint-config-types @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint
In your eslint.config.js
file, add:
import types from "eslint-config-types";
export default [
types,
// existing config (if any)
];
In your .eslintrc.json
file, add:
"extends": "types/legacy"
This config only allows TypeScript features supported in the following environments:
- Babel
- Bun
- Deno
- esbuild
- Node.js
- swc
- Vite
- Experimental decorators
- Namespaces
- Parameter properties
- Property accessibility
- Enums