Registry / testing / tslint-to-eslint-config

tslint-to-eslint-config

JSON →
library2.16.0jsnpmunverified

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.

npm install tslint-to-eslint-config
INSTALL
IMPORT
SIG · TSLINT-TO-ESLINT-C
T
tslint-to-eslint-config
testingjavascriptv2.16.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

convertConfig
import { convertConfig } from 'tslint-to-eslint-config'
const convertConfig = require('tslint-to-eslint-config')
Package is ESM-only from v2.13+; CommonJS require does not work.
TSLintToESLintResult
import type { TSLintToESLintResult } from 'tslint-to-eslint-config'
import { TSLintToESLintResult } from 'tslint-to-eslint-config'
Type import needed for TypeScript; named import will not exist at runtime.
convertComments
import { convertComments } from 'tslint-to-eslint-config/converters'
import { convertComments } from 'tslint-to-eslint-config'
Utility function is in a subpath export; not exported from main entry.

Reads TSLint config and generates ESLint config object. Requires Node >=14.0.0.

import { convertConfig } from 'tslint-to-eslint-config'; async function main() { const result = await convertConfig({ tslint: './tslint.json', typescript: './tsconfig.json', eslint: './.eslintrc.js', package: './package.json', prettier: true, comments: true, }); console.log(JSON.stringify(result.config, null, 2)); } main().catch(console.error);
tslint-to-eslint-config --version
Debug
Known issues
breakingv2.13.0 switched to ECMAScript modules (ESM). CJS require() no longer works.
fix
Use import syntax and ensure your project is ESM or use dynamic import.
affects: >=2.13.0
gotchaThe package expects Node >=14.0.0. Older versions will fail with syntax errors.
fix
Upgrade Node to 14 or later.
affects: <2.13.0
deprecatedTSLint is deprecated. This tool is for migration only; not intended for ongoing use.
fix
Use ESLint directly after migration.
affects: *
gotchaSome TSLint rules have no ESLint equivalent and are wrapped with eslint-plugin-tslint, which may degrade performance.
fix
Manually replace wrapped rules with native ESLint rules when possible.
affects: *
breakingv2.12.0 removed integration with deprecated Prettier ESLint configs. Config output may differ.
fix
Check generated config for Prettier settings and adjust manually if needed.
affects: >=2.12.0
Errors
Common errors & fixes
Cannot find module 'tslint-to-eslint-config'
Package not installed or not using ESM import.
fix
Install package (npm install --save-dev tslint-to-eslint-config) and use import syntax.
SyntaxError: Unexpected token 'export'
Node version <14 or CommonJS environment trying to load ESM.
fix
Upgrade Node to >=14 and use import syntax or run with --experimental-modules.
Error: TSLint configuration file not found: ./tslint.json
Missing or incorrect path to TSLint config.
fix
Specify correct path with --tslint flag or ensure tslint.json exists in working directory.
Upgrade
Version history
2.16.0latest on npm
Audit
Dependencies
commanderrequiredCLI argument parsing
fast-globrequiredFile glob pattern matching
typescriptrequiredTypeScript compiler API for parsing configs
eslintrequiredESLint library for config validation
Agent activity
7 hits · last 30 days
node
6
Resources
tslint-to-eslint-config — npm install tslint-to-eslint-config · libregistry