{"id":20627,"library":"tslint-to-eslint-config","title":"tslint-to-eslint-config","description":"Automated tool to convert TSLint configuration to the closest reasonable ESLint equivalent, facilitating migration from the deprecated TSLint to ESLint. Current stable version is 2.16.0, released with minor fixes and dependency updates. It reads existing linter, TypeScript, and package configs, generates an .eslintrc.js, and supports CLI flags for customization. Key differentiators: community-maintained under typescript-eslint, handles rule mapping with fallback to eslint-plugin-tslint for unmatched rules, and includes inline comment conversion.","status":"active","version":"2.16.0","language":"javascript","source_language":"en","source_url":"https://github.com/typescript-eslint/tslint-to-eslint-config","tags":["javascript","eslint","tslint","lint","configuration","typescript"],"install":[{"cmd":"npm install tslint-to-eslint-config","lang":"bash","label":"npm"},{"cmd":"yarn add tslint-to-eslint-config","lang":"bash","label":"yarn"},{"cmd":"pnpm add tslint-to-eslint-config","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"CLI argument parsing","package":"commander","optional":false},{"reason":"File glob pattern matching","package":"fast-glob","optional":false},{"reason":"TypeScript compiler API for parsing configs","package":"typescript","optional":false},{"reason":"ESLint library for config validation","package":"eslint","optional":false}],"imports":[{"note":"Package is ESM-only from v2.13+; CommonJS require does not work.","wrong":"const convertConfig = require('tslint-to-eslint-config')","symbol":"convertConfig","correct":"import { convertConfig } from 'tslint-to-eslint-config'"},{"note":"Type import needed for TypeScript; named import will not exist at runtime.","wrong":"import { TSLintToESLintResult } from 'tslint-to-eslint-config'","symbol":"TSLintToESLintResult","correct":"import type { TSLintToESLintResult } from 'tslint-to-eslint-config'"},{"note":"Utility function is in a subpath export; not exported from main entry.","wrong":"import { convertComments } from 'tslint-to-eslint-config'","symbol":"convertComments","correct":"import { convertComments } from 'tslint-to-eslint-config/converters'"}],"quickstart":{"code":"import { convertConfig } from 'tslint-to-eslint-config';\n\nasync function main() {\n  const result = await convertConfig({\n    tslint: './tslint.json',\n    typescript: './tsconfig.json',\n    eslint: './.eslintrc.js',\n    package: './package.json',\n    prettier: true,\n    comments: true,\n  });\n  console.log(JSON.stringify(result.config, null, 2));\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Reads TSLint config and generates ESLint config object. Requires Node >=14.0.0."},"warnings":[{"fix":"Use import syntax and ensure your project is ESM or use dynamic import.","message":"v2.13.0 switched to ECMAScript modules (ESM). CJS require() no longer works.","severity":"breaking","affected_versions":">=2.13.0"},{"fix":"Upgrade Node to 14 or later.","message":"The package expects Node >=14.0.0. Older versions will fail with syntax errors.","severity":"gotcha","affected_versions":"<2.13.0"},{"fix":"Use ESLint directly after migration.","message":"TSLint is deprecated. This tool is for migration only; not intended for ongoing use.","severity":"deprecated","affected_versions":"*"},{"fix":"Manually replace wrapped rules with native ESLint rules when possible.","message":"Some TSLint rules have no ESLint equivalent and are wrapped with eslint-plugin-tslint, which may degrade performance.","severity":"gotcha","affected_versions":"*"},{"fix":"Check generated config for Prettier settings and adjust manually if needed.","message":"v2.12.0 removed integration with deprecated Prettier ESLint configs. Config output may differ.","severity":"breaking","affected_versions":">=2.12.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install package (npm install --save-dev tslint-to-eslint-config) and use import syntax.","cause":"Package not installed or not using ESM import.","error":"Cannot find module 'tslint-to-eslint-config'"},{"fix":"Upgrade Node to >=14 and use import syntax or run with --experimental-modules.","cause":"Node version <14 or CommonJS environment trying to load ESM.","error":"SyntaxError: Unexpected token 'export'"},{"fix":"Specify correct path with --tslint flag or ensure tslint.json exists in working directory.","cause":"Missing or incorrect path to TSLint config.","error":"Error: TSLint configuration file not found: ./tslint.json"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}