Skip to content

typescript-eslint/eslint-plugin-tslint

Repository files navigation

@typescript-eslint/eslint-plugin-tslint

ESLint plugin that wraps a TSLint configuration and lints the whole source using TSLint.

NPM Version NPM Downloads

Per What About TSLint?, we highly recommend migrating off TSLint. See typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.

Installation

yarn add -D @typescript-eslint/eslint-plugin-tslint

Usage

Configure in your ESLint config file:

{
  "plugins": [
    "@typescript-eslint/tslint"
  ],
  "parserOptions": {
      "project": "tsconfig.json",
  },
  "rules": {
    "@typescript-eslint/tslint/config": ["warn", {
      "lintFile": "", // path to tslint.json of your project
      "rules": {
        // tslint rules (will be used if `lintFile` is not specified)
      },
      "rulesDirectory": [
        // array of paths to directories with rules, e.g. 'node_modules/tslint/lib/rules' (will be used if `lintFile` is not specified)
      ]
    }],
  }
}

Note: The ability to automatically fix problems with --fix is unavailable for TSLint rules loaded with this plugin.

Rules

This plugin contains only a single rule: @typescript-eslint/tslint/config.

About

ESLint plugin that wraps a TSLint configuration and lints the whole source using TSLint

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published