Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including @typescript-eslint/eslint-plugin-tslint with all npm packages installed. Try it out:

require("eslint/package.json"); // eslint is a peer dependency. require("tslint/package.json"); // tslint is a peer dependency. require("typescript/package.json"); // typescript is a peer dependency. var eslintPluginTslint = require("@typescript-eslint/eslint-plugin-tslint")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@typescript-eslint/eslint-plugin-tslint v4.3.0

TSLint wrapper plugin for ESLint

ESLint Plugin TSLint

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

CI NPM Version NPM Downloads

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

Plugin contains only single rule @typescript-eslint/tslint/config.

Examples

TSLint Plugins

  • https://github.com/Glavin001/tslint-clean-code
  • https://github.com/Microsoft/tslint-microsoft-contrib
  • https://github.com/SonarSource/SonarTS
  • https://github.com/ajafff/tslint-consistent-codestyle

Contributing

See the contributing guide here

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free