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 400,000 packages pre-installed, including eslint-plugin-typescript with all npm packages installed. Try it out:

var eslintPluginTypescript = require("eslint-plugin-typescript")

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

eslint-plugin-typescript v0.14.0

TypeScript plugin for ESLint


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


You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install typescript-eslint-parser:

$ npm install typescript-eslint-parser --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.


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

    "parser": "typescript-eslint-parser",
    "plugins": [

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

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

Supported Rules

* [`typescript/adjacent-overload-signatures`](./docs/rules/ — Require that member overloads be consecutive * [`typescript/class-name-casing`](./docs/rules/ — Require PascalCased class and interface names (`class-name` from TSLint) * [`typescript/explicit-function-return-type`](./docs/rules/ — Require explicit return types on functions and class methods * [`typescript/explicit-member-accessibility`](./docs/rules/ — Require explicit accessibility modifiers on class properties and methods (`member-access` from TSLint) * [`typescript/generic-type-naming`](./docs/rules/ — Enforces naming of generic type variables * [`typescript/interface-name-prefix`](./docs/rules/ — Require that interface names be prefixed with `I` (`interface-name` from TSLint) * [`typescript/member-delimiter-style`](./docs/rules/ — Require a specific member delimiter style for interfaces and type literals * [`typescript/member-naming`](./docs/rules/ — Enforces naming conventions for class members by visibility. * [`typescript/member-ordering`](./docs/rules/ — Require a consistent member declaration order (`member-ordering` from TSLint) * [`typescript/no-angle-bracket-type-assertion`](./docs/rules/ — Enforces the use of `as Type` assertions instead of `` assertions (`no-angle-bracket-type-assertion` from TSLint) * [`typescript/no-array-constructor`](./docs/rules/ — Disallow generic `Array` constructors * [`typescript/no-empty-interface`](./docs/rules/ — Disallow the declaration of empty interfaces (`no-empty-interface` from TSLint) * [`typescript/no-explicit-any`](./docs/rules/ — Disallow usage of the `any` type (`no-any` from TSLint) * [`typescript/no-inferrable-types`](./docs/rules/ — Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean. (`no-inferrable-types` from TSLint) * [`typescript/no-namespace`](./docs/rules/ — Disallow the use of custom TypeScript modules and namespaces * [`typescript/no-non-null-assertion`](./docs/rules/ — Disallows non-null assertions using the `!` postfix operator (`no-non-null-assertion` from TSLint) * [`typescript/no-parameter-properties`](./docs/rules/ — Disallow the use of parameter properties in class constructors. (`no-parameter-properties` from TSLint) * [`typescript/no-triple-slash-reference`](./docs/rules/ — Disallow `/// ` comments (`no-reference` from TSLint) * [`typescript/no-type-alias`](./docs/rules/ — Disallow the use of type aliases (`interface-over-type-literal` from TSLint) * [`typescript/no-unused-vars`](./docs/rules/ — Prevent TypeScript-specific constructs from being erroneously flagged as unused * [`typescript/no-use-before-define`](./docs/rules/ — Disallow the use of variables before they are defined * [`typescript/no-var-requires`](./docs/rules/ — Disallows the use of require statements except in import statements (`no-var-requires` from TSLint) * [`typescript/prefer-namespace-keyword`](./docs/rules/ — Require the use of the `namespace` keyword instead of the `module` keyword to declare custom TypeScript modules. (`no-internal-module` from TSLint) * [`typescript/type-annotation-spacing`](./docs/rules/ — Require consistent spacing around type annotations
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