{"id":15104,"library":"eslint-config-typescript","title":"ESLint Configuration for TypeScript Projects","description":"eslint-config-typescript is an opinionated, base set of recommended ESLint rules specifically designed for TypeScript projects. It bundles configurations for common scenarios, including React and Prettier integration. The current stable version is 3.0.0. Release cadence appears to be driven by dependency updates and feature additions, with major versions introducing breaking changes. Its key differentiator is providing a pre-configured, modular setup that simplifies ESLint adoption for TypeScript, reducing the boilerplate of manually configuring `@typescript-eslint/eslint-plugin` and `@typescript-eslint/parser` while offering extensions for popular tools like Prettier and React out-of-the-box. It requires ESLint 6.0.0 or higher for full functionality.","status":"active","version":"3.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/weirdpattern/eslint-config-typescript","tags":["javascript","eslint","config","eslintconfig","eslint-config","typescript","prettier","react"],"install":[{"cmd":"npm install eslint-config-typescript","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-typescript","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-typescript","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for TypeScript-specific ESLint rules.","package":"@typescript-eslint/eslint-plugin","optional":false},{"reason":"Required for parsing TypeScript code with ESLint.","package":"@typescript-eslint/parser","optional":false},{"reason":"Core ESLint engine. Version >=6.0.0 is required for v3.0.0.","package":"eslint","optional":false},{"reason":"The TypeScript compiler, used by the ESLint parser.","package":"typescript","optional":false}],"imports":[{"note":"ESLint configurations are typically 'extended' in the .eslintrc file, not directly imported as JavaScript modules.","wrong":"import config from 'eslint-config-typescript'","symbol":"base configuration","correct":"{ \"extends\": [\"typescript\"] }"},{"note":"Use this specific path in your ESLint config's `extends` array when working with React projects.","symbol":"React configuration","correct":"{ \"extends\": [\"typescript/react\"] }"},{"note":"Extends the base config with Prettier-specific rules to disable conflicting ESLint rules and integrate Prettier formatting.","symbol":"Prettier integration","correct":"{ \"extends\": [\"typescript/prettier\"] }"},{"note":"Automatically includes `typescript/prettier`. This is the recommended extension for React projects that also use Prettier.","symbol":"Prettier + React integration","correct":"{ \"extends\": [\"typescript/prettier-react\"] }"}],"quickstart":{"code":"{\n  \"extends\": [\n    \"typescript\",\n    \"typescript/prettier-react\"\n  ],\n  \"plugins\": [\"filenames\", \"jest\"],\n  \"env\": {\n    \"jest\": true,\n    \"node\": true\n  },\n  \"rules\": {\n    \"filenames/no-index\": \"error\",\n    \"filenames/match-exported\": [\"error\", \"kebab\"],\n    \"jest/no-disabled-tests\": \"error\",\n    \"jest/no-focused-tests\": \"error\",\n    \"jest/no-identical-title\": \"error\",\n    \"jest/valid-expect\": \"error\",\n    \"prettier/prettier\": [\n      \"error\",\n      {\n        \"semi\": false,\n        \"tabWidth\": 4,\n        \"singleQuote\": true\n      }\n    ]\n  }\n}","lang":"json","description":"This quickstart demonstrates a complete ESLint configuration for a TypeScript/React project, integrating Prettier with custom settings and additional plugins like `filenames` and `jest`."},"warnings":[{"fix":"Ensure your project's `eslint` peer dependency is updated to `^6.0.0` or higher.","message":"Version 3.0.0 introduces breaking changes by updating dependencies and introducing overrides exclusive to TypeScript. This requires ESLint version 6.0.0 or newer to support `extends` within overrides.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Review your ESLint configuration file when upgrading from v1 to v2. Specifically, if you were combining `prettier` and `react` manually, consider using the new `typescript/prettier-react` preset.","message":"Version 2.0.0 introduced breaking changes due to dependency upgrades and structural changes. The `prettier` configuration was updated to include TypeScript settings, and a new `prettier-react` configuration was introduced.","severity":"breaking","affected_versions":">=2.0.0 <3.0.0"},{"fix":"Always list `\"typescript\"` (and its sub-configs like `\"typescript/react\"`) as the last entry in your `.eslintrc` file's `extends` array.","message":"ESLint configuration files require the `eslint-config-typescript` entry to be placed last in the `extends` array to ensure it correctly overrides other configurations and applies its opinionated rules without conflicts.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-21T00:00:00.000Z","next_check":"2026-07-20T00:00:00.000Z","problems":[{"fix":"Run `npm install --save-dev eslint-config-typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint typescript`","cause":"The `eslint-config-typescript` package or its peer dependencies are not installed, or ESLint cannot find them.","error":"Error: Failed to load config \"typescript\" to extend from. Referenced from ..."},{"fix":"Update your project's `typescript` package: `npm install --save-dev typescript@latest`.","cause":"The `typescript` peer dependency is outdated or incompatible with the installed `@typescript-eslint/parser`.","error":"Error: You have used a version of TypeScript which is not supported by @typescript-eslint/typescript-estree. Please update to TypeScript >=3.2.1."},{"fix":"Ensure your `.eslintrc` file explicitly includes `\"parser\": \"@typescript-eslint/parser\"` at the top level, or within specific `overrides`.","cause":"Although `eslint-config-typescript` sets the parser, if you define your own `parserOptions` or have conflicting configs, this error can appear.","error":"Error: The 'parser' option is required when using a custom parser. Please set 'parser' to '@typescript-eslint/parser' in your ESLint configuration file."}],"ecosystem":"npm"}