Skip to content
Converts your TSLint configuration to the closest possible ESLint equivalent.
TypeScript JavaScript
Branch: master
Clone or download
Latest commit 861ac75 Aug 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Persisted tsc task output to CircleCI workspace (#109) Jul 16, 2019
.github Replaced JoshuaKGoldberg GitHub user with typescript-eslint org Jul 20, 2019
.vscode Added rudimentary end-to-end test infrastructure (#81) Jul 5, 2019
bin Initial commit Jun 24, 2019
docs Added tests for stderr from missing tslint.json files (#127) Jul 28, 2019
src Merge and deduplicate rule notices (#141) Aug 13, 2019
test Added, corrected end-to-end tests for TypeScript config paths (#134) Aug 3, 2019
.eslintignore Added .circleci/config.yml with ESLint setup Jun 25, 2019
.eslintrc.js Added error reporting for writeConfigurationFile failures (#122) Jul 28, 2019
.gitignore Added tests for stderr from missing tslint.json files (#127) Jul 28, 2019
.npmignore Added 'publish' CircleCI step for master branch (#71) Jul 3, 2019
.prettierignore Added rudimentary end-to-end test infrastructure (#81) Jul 5, 2019
.prettierrc Initial commit Jun 24, 2019
LICENSE.md Initial commit Jun 24, 2019
README.md Changed period to colon in README.md (#140) Aug 7, 2019
babel.config.js Switched from ts-jest to babel (#38) Jun 30, 2019
jest.config.js Added rudimentary end-to-end test infrastructure (#81) Jul 5, 2019
package-lock.json 0.2.4 Aug 14, 2019
package.json 0.2.4 Aug 14, 2019
renovate.json Enabled renovate bot automerge (#36) Jun 30, 2019
tsconfig.json Added tests for stderr from missing tslint.json files (#127) Jul 28, 2019

README.md

tslint-to-eslint-config

Code Style: Prettier Coverage: 100% TypeScript: Strict NPM version Circle CI Join the chat at https://gitter.im/tslint-to-eslint-config/community Code Style: Prettier

Converts your TSLint configuration to the closest possible ESLint equivalent.

👉 Did you know TSLint is being deprecated this year? Hooray! Use tslint-to-eslint-config to expedite migrating your project onto ESLint.

Consider taking a peek at the relevant documentation: 🤔

Usage

npx tslint-to-eslint-config

⚡ (wow, so simple!) ⚡

The tslint-to-eslint-config command reads in any existing linter, TypeScript, and package configuration files, then creates an .eslintrc.js result based on them.

For any TSLint rules with corresponding ESLint equivalents, those equivalents will be used in the new configuration. TSLint rules without ESLint equivalents will be wrapped with eslint-plugin-tslint.

CLI Flags

Each of these flags is optional:

  • config: Path to print the generated ESLint configuration file to.
  • eslint: Path to an ESLint configuration file to read settings from.
  • package: Path to a package.json file to read dependencies from.
  • tslint: Path to a TSLint configuration file to read settings from.
  • typescript: Path to a TypeScript configuration file to read TypeScript compiler options from.

config

npx tslint-to-eslint-config --config .eslintrc.json

Default: .eslintrc.js

Path to print the generated ESLint configuration file to.

The file extension of this path will be used to determine the format of the created file:

  • .js file paths will be written module.exports = ... JavaScript
  • Other file paths will default to JSON

eslint

npx tslint-to-eslint-config --eslint ./path/to/eslintrc.js

Default: --config's value

Path to an ESLint configuration file to read settings from. The generated ESLint configuration file will include any settings imported from this file.

package

npx tslint-to-eslint-config --package ./path/to/package.json

Default: package.json

Path to a package.json file to read dependencies from. This will help inform the generated ESLint configuration file's env settings.

tslint

npx tslint-to-eslint-config --tslint ./path/to/tslint.json

Default: tslint.json

Path to a TSLint configuration file to read settings from. This file is piped into TSLint's --print-config to generate the list of rules to enable in the generated ESLint configuration file.

typescript

npx tslint-to-eslint-config --typescript ./path/to/tsconfig.json

Default: tsconfig.json

Path to a TypeScript configuration file to read TypeScript compiler options from. This will help inform the generated ESLint configuration file's env settings.

Development

See the Code of Conduct and general development docs. 💖

You can’t perform that action at this time.