Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Update readme and package info to reflect the package name change #30

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# eslint-plugin-typescript
# eslint-plugin-ts/eslint-plugin-typescript

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

Note: The package name has been changed from eslint-plugin-typescript to eslint-plugin-ts on npm.

## Installation

You'll first need to install [ESLint](http://eslint.org):
Expand All @@ -16,13 +18,13 @@ Next, install `typescript-eslint-parser`:
$ npm install typescript-eslint-parser --save-dev
```

Last, install `eslint-plugin-typescript`:
Last, install `eslint-plugin-ts`:

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

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

## Usage

Expand All @@ -32,7 +34,7 @@ Add `typescript-eslint-parser` to the `parser` field and `typescript` to the plu
{
"parser": "typescript-eslint-parser",
"plugins": [
"typescript"
"ts"
]
}
```
Expand All @@ -42,18 +44,18 @@ Then configure the rules you want to use under the rules section.
```json
{
"rules": {
"typescript/rule-name": "error"
"ts/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.
* `typescript/interface-name-prefix` - enforces interface names are prefixed.
* `typescript/no-triple-slash-reference` - enforces `/// <reference />` is not used.
* `typescript/no-explicit-any` - enforces the any type is not used.
* `typescript/no-angle-bracket-type-assertion` - enforces the use of `as Type` assertions instead of `<Type>` assertions.
* `typescript/no-namespace` - disallows the use of custom TypeScript modules and namespaces.
* `typescript/prefer-namespace-keyword` - enforces the use of the keyword `namespace` over `module` to declare custom TypeScript modules.
* `ts/type-annotation-spacing` - enforces one space after the colon and zero spaces before the colon of a type annotation.
* `ts/explicit-member-accessibility` - enforces accessibility modifiers on class properties and methods.
* `ts/interface-name-prefix` - enforces interface names are prefixed.
* `ts/no-triple-slash-reference` - enforces `/// <reference />` is not used.
* `ts/no-explicit-any` - enforces the any type is not used.
* `ts/no-angle-bracket-type-assertion` - enforces the use of `as Type` assertions instead of `<Type>` assertions.
* `ts/no-namespace` - disallows the use of custom TypeScript modules and namespaces.
* `ts/prefer-namespace-keyword` - enforces the use of the keyword `namespace` over `module` to declare custom TypeScript modules.
Loading