@lehoczky/eslint-config-typescript
v2.0.3
Published
[![npm version](https://badge.fury.io/js/@lehoczky%2Feslint-config-typescript.svg)](https://badge.fury.io/js/@lehoczky%2Feslint-config-typescript)
Downloads
427
Readme
Eslint Config TypeScript
ESLint configuration for TypeScript projects. Supports prettier by default.
💿 Installation
pnpm add -D eslint typescript @lehoczky/eslint-config-typescript
💻 Usage
With Type Checking
eslint.config.mjs
:
import { configLehoczkyTypescript } from "@lehoczky/eslint-config-typescript"
/** @type {import("eslint").Linter.Config[]} */
export default configLehoczkyTypescript({
parserOptionsForTypeChecking: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
})
See more: typescript-eslint | Linting with Type Information
Without Type Checking
import { configLehoczkyTypescript } from "@lehoczky/eslint-config-typescript"
/** @type {import("eslint").Linter.Config[]} */
export default configLehoczkyTypescript()
📢 Commands
package.json
:
{
"scripts": {
"eslint:check": "eslint --max-warnings=0",
"eslint:fix": "eslint --max-warnings=0 --fix"
}
}