https://github.com/nickserv/eslint-config-types
ESLint configuration for JavaScript using stripped types, without TypeScript runtime features
https://github.com/nickserv/eslint-config-types
Last synced: 8 months ago
JSON representation
ESLint configuration for JavaScript using stripped types, without TypeScript runtime features
- Host: GitHub
- URL: https://github.com/nickserv/eslint-config-types
- Owner: nickserv
- Created: 2024-08-06T18:56:27.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-06T08:51:22.000Z (over 1 year ago)
- Last Synced: 2025-02-13T11:05:53.142Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://npm.im/eslint-config-types
- Size: 41 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `eslint-config-types`
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](https://devblogs.microsoft.com/typescript/announcing-typescript-5-8-beta/#the---erasablesyntaxonly-option).
> \
> If you're not already using `eslint-config-types`, I recommend trying out
> [TypeScript 5.8 beta](https://devblogs.microsoft.com/typescript/announcing-typescript-5-8-beta/)
> instead.
## Installation
```
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
```
## Usage
In your `eslint.config.js` file, add:
```js
import types from "eslint-config-types";
export default [
types,
// existing config (if any)
];
```
In your `.eslintrc.json` file, add:
```json
"extends": "types/legacy"
```
## Environment support
This config only allows TypeScript features supported in the following
environments:
- Babel
- Bun
- Deno
- esbuild
- Node.js
- swc
- Vite
## Features to avoid
- [Experimental decorators](https://www.typescriptlang.org/tsconfig/#experimentalDecorators)
- [Namespaces](https://www.typescriptlang.org/docs/handbook/namespaces.html)
- [Parameter properties](https://www.typescriptlang.org/docs/handbook/2/classes.html#parameter-properties)
- Property accessibility
- [Enums](https://www.typescriptlang.org/docs/handbook/enums.html)
## Inspiration
https://x.com/sebastienlorber/status/1820497162872226062
## Thanks
- [Sébastien Lorber](https://github.com/slorber)
- [Josh Goldberg](https://github.com/JoshuaKGoldberg)