eslint-plugin-microsoft-typescript
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
License and Copyright
This software is released under the terms of the MIT license.