eslint-config-typescript-tc is a shareable ESLint configuration designed specifically for TypeScript projects, building upon the foundational ruleset provided by eslint-config-tc. It aims to enforce consistent code quality and style across TypeScript codebases, integrating seamlessly with Prettier to handle formatting conflicts. The package is currently at version 12.1.0 and receives regular updates, typically aligning with major releases of typescript-eslint, TypeScript itself, and Node.js LTS versions. A key differentiator is its layered approach, requiring eslint-config-tc as a base, which ensures a cohesive linting experience for both JavaScript and TypeScript files within a monorepo or project. It supports both traditional .eslintrc.js CommonJS configurations and the newer ESLint Flat Config introduced with ESLint v9/v10, requiring Node.js >=22.0.0 and npm >=10.0.0 for the latest versions.
npm install eslint-config-typescript-tcVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to install `eslint-config-typescript-tc` and configure it in a basic TypeScript project using an `.eslintrc.js` file, along with a minimal `tsconfig.json` and a sample TypeScript file to lint.
Upgrade Node.js to >=22.0.0 and ESLint to >=10.0.0, then migrate your ESLint configuration to the Flat Config format (e.g., `eslint.config.js`).
Ensure your `typescript-eslint` peer dependency is updated to the corresponding major version required by `eslint-config-typescript-tc`. Consult the `typescript-eslint` changelog for migration guides between major versions (e.g., v6 to v7, v7 to v8).
Upgrade your Node.js runtime to meet the minimum requirements of the installed `eslint-config-typescript-tc` version. For v12.x.x, Node.js 22 is required.
Ensure your `typescript-eslint` dependency is updated to at least v8.58.0 when using `eslint-config-typescript-tc` v12.1.0 or newer with TypeScript 6.x.x.
Verify that `parserOptions.project` points to the correct `tsconfig.json` file relative to `tsconfigRootDir`. Use `__dirname` for CommonJS or `import.meta.dirname` for ESM in `tsconfigRootDir` to ensure correct resolution.
Ensure the path in `parserOptions.project` (e.g., `'./tsconfig.json'`) is correct relative to `tsconfigRootDir`, and that `tsconfigRootDir: __dirname` (or `import.meta.dirname` for ESM) is also specified and correct.
Double-check your `parserOptions` in your ESLint config. Make sure `project` is correctly pointing to your `tsconfig.json` and that `tsconfigRootDir` is set to the directory containing your ESLint config file.
Verify the `tsconfig.json` file exists at the specified path and that `parserOptions.project` is correctly configured relative to `tsconfigRootDir`.
For ESLint v9+ or projects using ESM, migrate your ESLint configuration to the Flat Config style (e.g., in `eslint.config.js` with `export default [...]`) as shown in the `Imports` section for Flat Config.