Skip to content

weirdpattern/eslint-plugin-typescript

 
 

Repository files navigation

eslint-plugin-typescript

TypeScript support for ESLint. (This is still in the very early stages, so please be patient.)

The below readme is for the upcoming 1.0.0 release. Please see this tag for the current NPM version (0.14.0)

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Last, install eslint-plugin-typescript:

$ npm install eslint-plugin-typescript --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-typescript globally.

Usage

Add eslint-plugin-typescript/parser to the parser field and typescript to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "parser": "eslint-plugin-typescript/parser",
    "plugins": ["typescript"]
}

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

{
    "rules": {
        "typescript/rule-name": "error"
    }
}

Note: The plugin provides its own version of the typescript-eslint-parser via eslint-plugin-typescript/parser. This guarantees 100% compatibility between the plugin and the parser.

Supported Rules

About

TypeScript plugin for ESLint

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%