Skip to content

Commit 0ddb93c

Browse files
authored
feat(eslint-plugin): remove exported parser (#94)
1 parent 7d178a9 commit 0ddb93c

File tree

2 files changed

+7
-30
lines changed

2 files changed

+7
-30
lines changed

packages/eslint-plugin/README.md

+7-20
Original file line numberDiff line numberDiff line change
@@ -10,53 +10,40 @@
1010

1111
## Installation
1212

13-
You'll first need to install [ESLint](http://eslint.org):
14-
15-
```sh
16-
npm i eslint --save-dev
17-
```
18-
19-
Next, install `typescript` if you haven’t already:
20-
21-
```sh
22-
npm i typescript@~3.1.1 --save-dev
23-
```
24-
25-
Last, install `@typescript-eslint/eslint-plugin`:
13+
Make sure you have TypeScript and @typescript-eslint/parser installed, then install the plugin:
2614

2715
```sh
2816
npm i @typescript-eslint/eslint-plugin --save-dev
2917
```
3018

19+
It is important that you use the same version number for `@typescript-eslint/parser` and `@typescript-eslint/eslint-plugin`.
20+
3121
**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `@typescript-eslint/eslint-plugin` globally.
3222

3323
## Usage
3424

35-
Add `@typescript-eslint/eslint-plugin/parser` to the `parser` field and `typescript` to the plugins section of your `.eslintrc` configuration file:
25+
Add `@typescript-eslint/parser` to the `parser` field and `@typescript-eslint` to the plugins section of your `.eslintrc` configuration file:
3626

3727
```json
3828
{
39-
"parser": "@typescript-eslint/eslint-plugin/parser",
29+
"parser": "@typescript-eslint/parser",
4030
"plugins": ["@typescript-eslint"]
4131
}
4232
```
4333

44-
Note: The plugin provides its own version of the `@typescript-eslint/parser` via `@typescript-eslint/eslint-plugin/parser`.
45-
This helps us guarantee 100% compatibility between the plugin and the parser.
46-
4734
Then configure the rules you want to use under the rules section.
4835

4936
```json
5037
{
51-
"parser": "@typescript-eslint/eslint-plugin/parser",
38+
"parser": "@typescript-eslint/parser",
5239
"plugins": ["@typescript-eslint"],
5340
"rules": {
5441
"@typescript-eslint/rule-name": "error"
5542
}
5643
}
5744
```
5845

59-
You can also enable all the recommended rules at once. Add `plugin:typescript/recommended` in extends:
46+
You can also enable all the recommended rules at once. Add `plugin:@typescript-eslint/recommended` in extends:
6047

6148
```json
6249
{

packages/eslint-plugin/parser.js

-10
This file was deleted.

0 commit comments

Comments
 (0)