The future of TSLint and what it means for Codeac.io users

The future of TSLint and what it means for Codeac.io users The future of TSLint and what it means for Codeac.io users The future of TSLint and what it means for Codeac.io users The future of TSLint and what it means for Codeac.io users
Everything you need to know about why TSLint is being deprecated and how Codeac.io will ensure you can continue to analyse and improve your code effectively.

Palantir – the creators of TSLint – recently announced that the tool will soon be deprecated. This short post explains why this change is happening, how it will benefit developers, and what you need to do to continue analysing and improving your code effectively with Codeac.io.

An ongoing effort to unify the TypeScript and JavaScript languages will see many key TypeScript features, like types and static analysis, become part of the JavaScript developer experience. This convergence goal includes each service’s standard linters – TSLint and ESLint – which are tools used to maintain code quality.

While TSLint and ESLint share common rules, each linter also has unique capabilities. ESLint is better in automatic indentation and conditional linting, while TSLint can handle static analysis violations thanks to type annotations in TypeScript as well code smells covered by semantic rules.

To bring all of these benefits to every developer, the Palantir team has decided to focus on improving TypeScript support for ESLint, while TSLint will be deprecated. Choosing this way to standardise the linting approach will ensure that more developers can access TypeScript-specific static analysis and deliver better code more consistently.

How will this impact Codeac.io?

Here at Codeac.io we are ready for these changes and will continue to support your needs however you choose to move ahead:

  • If you stick with TSLint: our service will work as before and you will not need to do anything differently. As it’s likely that TSLint will eventually cease to operate completely, you should start planning for a future without it.
  • If you decide to start using the ESLint plugin for TypeScript, we suggest taking the following two steps:
    1. Set up ESLint to support TypeScript as you normally would.

      .eslintrc.yml

      env:
          browser: true
          es6: true
          node: true
      parser: "@typescript-eslint/parser"
      plugins:
          - "@typescript-eslint"
      extends:
          - "eslint:recommended"
          - "plugin:@typescript-eslint/recommended"
      rules:
          complexity:
              - error
              - 10
      
    2. Allow ESLint to also analyze TypeScript files by adding this simple configuration file to the root of your repository:

      .codeac.yml

      ---
      
      version: '1'
      tools:
          eslint:
              ext: '.js,.jsx,.ts,.tsx'
          tslint:
              enabled: false
      

We will continue to monitor and support both TSLint and ESLint to ensure that Codeac.io continues to help you deliver cleaner code, faster. Feel free to get in touch if you have any questions or need further help with your configuration.

Ready to get started?

Use your favorite version control system to sign-up.

Sign up for free