TSLint configuration

TSLint requires configuration via a tslint.yaml or tslint.json configuration file as detailed in TSLint's documentation.

If you don't specify your custom configuration file we use our default below. We suggest to add your own configuration file into your repository root directory to be able to specify your coding and quality standards.

tslint.yaml

defaultSeverity: error
extends:
  - "tslint:recommended"

TSLint deprecation

According to Palantir's blog TSLint is going to be deprecated in favor of ESLint to join the forces and provide better linting experience for both languages.

In order to avoid bifurcating the linting tool space for TypeScript, we therefore plan to deprecate TSLint and focus our efforts instead on improving ESLint’s TypeScript support. Source: Palantir's blog

Codeac is ready for this situation and will support you in both scenarios. If you decided to stick with TSLint for a while you are just fine. Everything will work as you expect. If you decided to move forward to the new ESLint plugin way we have a few suggestions for you:

  1. Configure your ESLint to support TypeScript in the standard way.
  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
    
  3. Congrats! Enjoy your new analysis.

We are frequently updating our tools and plugins to bring you the best experience possible. You can expect more analysis and linting rules in your reports if you chose to use the ESLint plugin.

TSLint support

We are continually monitoring the situation of both tools and will support both as long as we can. If you have any issues with configuration, let us know, please. We will be happy to help you.