New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

eslint-plugin-microsoft-typescript

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-microsoft-typescript

ESlint rules for TypeScript

0.2.0
latest
Version published
Weekly downloads
49
Maintainers
1
Weekly downloads
 
Created

eslint-plugin-microsoft-typescript

GitHub license npm version Travis (.com) master npm downloads

Installation

Make sure you have TypeScript and @typescript-eslint/parser installed, then install the plugin:

$ npm i eslint-plugin-microsoft-typescript --save-dev

Usage

Add @typescript-eslint/parser to the parser field and eslint-plugin-microsoft-typescript to the plugins section of your .eslintrc configuration file:

{
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "project": "./tsconfig.json"
  }, 
  "plugins": ["microsoft-typescript"]
}

Then configure the rules you want to use under the rules section.

{
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "project": "./tsconfig.json"
  },
  "plugins": ["microsoft-typescript"],
  "rules": {
    "microsoft-typescript/rule-name": "error"
  }
}

Rules

  • object-literal-surrounding-space
  • no-type-assertion-whitespace
  • type-operator-spacing
  • only-arrow-functions
  • no-double-space
  • boolean-trivia
  • no-in-operator
  • debug-assert
  • no-keywords

This software is released under the terms of the MIT license.

FAQs

Package last updated on 22 Jul 2019

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