You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

eslint-plugin-ts

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-ts

ESLint TypeScript plugin

1.0.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

ESLint-plugin-ts

TypeScript specific linting rules for ESLint

Installation

Install ESLint either locally or globally.

$ npm i eslint --save-dev

If you installed ESLint globally, you have to install the plugin globally too. Otherwise, install it locally.

$ npm i eslint-plugin-ts --save-dev

Install typescript-eslint-parser either locally or globally.

$ npm i typescript-eslint-parser --save-dev

Configuration

Use the recommended preset to get reasonable defaults:

  "extends": [
    "eslint:recommended",
    "plugin:ts/recommended"
  ]

If you do not use a preset you will need to specify individual rules and add extra configuration.

Add "ts" to the plugins section.

{
  "plugins": ["ts"]
}

You will need to configure the TypeScript parser.

{
  "parser": "eslint-typescript-parser"
}

Enable the rules that you would like to use.

  "rules": {
    "ts/no-any": "error"
  }

List of supported rules

  • ts/no-any: Forbid the usage of the "any" type annotation

License

ESLint-plugin-ts is licensed under the MIT License.

Keywords

ESLint

FAQs

Package last updated on 02 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts