Migrate TSLint to ESLint

Since TSLint is deprecated, I migrated my TypeScript projects to ESLint.


I expect your project to contain the files:

  • package.json
  • tsconfig.json
  • tslint.json


First, uninstall tslint from package.json:

$ npm remove tslint

Verify typescript is still present:

$ npm list typescript


Then install eslint and the TypeScript eslint-plugin and parser:

$ npm install eslint @typescript-eslint/{eslint-plugin,parser} # --save-dev


Initialize .eslintrc:

$ npx eslint --init

Your base .eslintrc should look something like this:

  "extends": [
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "ecmaVersion": 11,
    "sourceType": "module"
  "plugins": ["@typescript-eslint"]

Move your tslint.json rules to .eslintrc.

Add env to your .eslintrc (if applicable):

  "env": {
    "browser": true,
    "es6": true,
    "jest": true,
    "node": true


Update your lint script in package.json:

   "scripts": {
-    "lint": "tslint -c tslint.json 'src/**/*.ts'"
+    "lint": "eslint --ignore-path .gitignore --ext .js,.ts .",

Test that it still works:

$ npm run lint


Migrate any TSLint configs/plugins to ESLint (if applicable).

The following example is for Prettier:

$ npm rm tslint-config-prettier
$ npm i eslint-plugin-prettier # -D

Don’t forget to update .eslintrc:

  // ...
  "plugins": ["@typescript-eslint", "prettier"],
  "rules": {
    "prettier/prettier": "error"

Here’s a pull request that I opened for phonetic-alphabet-converter.

Lastly, you can use tslint-to-eslint-config to migrate from TSLint to ESLint:

$ npx tslint-to-eslint-config

Please support this site and join our Discord!