Package Exports
- eslint-plugin-typescript
- eslint-plugin-typescript/lib/rules/adjacent-overload-signatures
- eslint-plugin-typescript/lib/rules/class-name-casing
- eslint-plugin-typescript/lib/rules/explicit-member-accessibility
- eslint-plugin-typescript/lib/rules/interface-name-prefix
- eslint-plugin-typescript/lib/rules/member-ordering
- eslint-plugin-typescript/lib/rules/no-angle-bracket-type-assertion
- eslint-plugin-typescript/lib/rules/no-empty-interface
- eslint-plugin-typescript/lib/rules/no-explicit-any
- eslint-plugin-typescript/lib/rules/no-namespace
- eslint-plugin-typescript/lib/rules/no-parameter-properties
- eslint-plugin-typescript/lib/rules/no-triple-slash-reference
- eslint-plugin-typescript/lib/rules/no-type-alias
- eslint-plugin-typescript/lib/rules/prefer-namespace-keyword
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-plugin-typescript) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
eslint-plugin-typescript
TypeScript support for ESLint. (This is still in the very early stages, so please be patient.)
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install typescript-eslint-parser:
$ npm install typescript-eslint-parser --save-devLast, install eslint-plugin-typescript:
$ npm install eslint-plugin-typescript --save-devNote: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-typescript globally.
Usage
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": [
"typescript"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"typescript/rule-name": "error"
}
}Supported Rules
typescript/type-annotation-spacing— enforces one space after the colon and zero spaces before the colon of a type annotation.typescript/explicit-member-accessibility— enforces accessibility modifiers on class properties and methods. (member-accessfrom TSLint)typescript/interface-name-prefix— enforces interface names are prefixed. (interface-namefrom TSLint)typescript/no-triple-slash-reference— enforces/// <reference />is not used. (no-referencefrom TSLint)typescript/no-explicit-any— enforces theanytype is not used. (no-anyfrom TSLint)typescript/no-angle-bracket-type-assertion— enforces the use ofas Typeassertions instead of<Type>assertions. (no-angle-bracket-type-assertionfrom TSLint)typescript/no-namespace— disallows the use of custom TypeScript modules and namespaces.typescript/no-use-before-define— disallows the use of variables before they are defined.typescript/prefer-namespace-keyword— enforces the use of the keywordnamespaceovermoduleto declare custom TypeScript modules. (no-internal-modulefrom TSLint)typescript/no-type-alias— disallows the use of type aliases. (interface-over-type-literalfrom TSLint)typescript/member-ordering— enforces a standard member declaration order. (member-orderingfrom TSLint)typescript/no-unused-vars— prevents TypeScript-specific constructs from being erroneously flagged as unusedtypescript/adjacent-overload-signatures— enforces member overloads to be consecutive.typescript/no-parameter-properties- disallows parameter properties in class constructors. (no-parameter-propertiesfrom TSLint)typescript/class-name-casing- enforces PascalCased class and interface names. (class-namefrom TSLint)typescript/member-delimiter-style- enforces a member delimiter style in interfaces and type literals.typescript/no-empty-interface- disallows the declaration of empty interfaces. (no-empty-interfacefrom TSLint)