Skip to content

TypeScript

TypeScript support is enabled from the lean v3 composer. There is no separate application-level install for TypeScript config.

bash
pnpm add -D @santi020k/eslint-config-basic eslint typescript
import { defineConfig } from '@santi020k/eslint-config-basic'
export default await defineConfig({
typescript: true
})

If a tsconfig.json or tsconfig.base.json exists, the one-line recommended entry and defineConfig() detect TypeScript automatically.

Use tsconfigRootDir when your project layout needs an explicit root for parser options.

import { defineConfig } from '@santi020k/eslint-config-basic'
export default await defineConfig({
tsconfigRootDir: import.meta.dirname,
typescript: true
})

Did this page help?

Your answer stays in this browser. Share details on GitHub to help improve the docs.