{"id":25532,"library":"eslint-plugin-tsc","title":"eslint-plugin-tsc","description":"ESLint plugin that wraps TypeScript compiler checks as an ESLint rule. Version 2.0.0 (September 2020) requires TypeScript 4+. It provides a single rule `tsc/config` that runs the TypeScript compiler on files linted by ESLint, reporting type errors and diagnostics. Unlike @typescript-eslint, which implements type-aware lint rules individually, this plugin directly invokes the full compiler, catching all type errors and compiler options like noUnusedLocals. Suitable for projects wanting to enforce compiler checks within ESLint without duplicating compiler options. Release cadence: infrequent, last release 2020.","status":"maintenance","version":"2.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/unlight/eslint-plugin-tsc","tags":["javascript","eslint","eslint-plugin","eslintplugin","eslint-rules","typescript","typescript-service"],"install":[{"cmd":"npm install eslint-plugin-tsc","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-tsc","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-tsc","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; plugin wraps TypeScript compiler","package":"typescript","optional":false},{"reason":"Peer dependency; plugin runs as ESLint rule","package":"eslint","optional":false}],"imports":[{"note":"Add 'tsc' to plugins array in ESLint config, then use rule 'tsc/config'.","wrong":null,"symbol":"plugin","correct":"module.exports = { plugins: ['tsc'] };"},{"note":"Rule requires options object with configFile path; severity can be 1 or 'warn'.","wrong":"\"tsc/config\": true","symbol":"tsc/config","correct":"\"tsc/config\": [\"warn\", { \"configFile\": \"./tsconfig.json\" }]"},{"note":"Absolute path recommended to avoid resolution issues.","wrong":null,"symbol":"configFile","correct":"\"tsc/config\": [1, { \"configFile\": \"/absolute/path/tsconfig.json\" }]"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  plugins: ['tsc'],\n  rules: {\n    'tsc/config': [\n      'warn',\n      {\n        configFile: './tsconfig.json',\n        compilerOptions: {\n          noUnusedLocals: true,\n          strictNullChecks: true\n        }\n      }\n    ]\n  }\n};\n\n// Run ESLint on a TypeScript file\n// eslint src/index.ts","lang":"javascript","description":"Configures eslint-plugin-tsc to run TypeScript compiler checks via the tsc/config rule, overriding compiler options."},"warnings":[{"fix":"Use eslint-plugin-tsc@1.2.0 if using TypeScript <4.","message":"Version 2.0.0 requires TypeScript 4+. Downgrade to 1.x for TypeScript 3.x compatibility.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Specify an absolute path for configFile, e.g., path.resolve(__dirname, 'tsconfig.json').","message":"The configFile path is relative to the current working directory, not the ESLint config file. Use absolute paths to avoid confusion.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use alongside @typescript-eslint for fine-grained lint rules if needed.","message":"Plugin only provides a single rule 'tsc/config'. It does not include individual rules like '@typescript-eslint/no-unused-vars'.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Migrate to @typescript-eslint/parser and @typescript-eslint/eslint-plugin.","message":"Plugin is thinly maintained; last release 2020. Consider switching to @typescript-eslint which is more actively maintained and integrates type checking.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Add configFile to rule options with correct path, e.g., \"configFile\": \"path/to/tsconfig.json\".","cause":"configFile path is missing or incorrect.","error":"Error: Could not find tsconfig.json. Please specify configFile in rule options."},{"fix":"Add @typescript-eslint/parser to your ESLint config: 'parser': '@typescript-eslint/parser'.","cause":"ESLint is parsing TypeScript as JavaScript. Need to configure TypeScript parser.","error":"Parsing error: The keyword 'import' is reserved"},{"fix":"Run npm install eslint-plugin-tsc --save-dev and add 'tsc' to plugins array.","cause":"eslint-plugin-tsc is not installed or not added to plugins array.","error":"Definition for rule 'tsc/config' was not found."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}