Skip to content

Commit 305a5f5

Browse files
authored
Merge pull request #48 from Quramy/fix/42
fix #42
2 parents 31c7f29 + 2b23d91 commit 305a5f5

File tree

9 files changed

+58
-78
lines changed

9 files changed

+58
-78
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ TypeScript language service plugin to check ESLint errors.
1919
### Requirements (peer dependencies)
2020

2121
- `typescript`
22-
- `@typescript-eslint/parser` >= 3.0.0
23-
- `@typescript-eslint/typescript-estree` >= 3.0.0
22+
- `@typescript-eslint/parser` >= 3.5.0
23+
- `@typescript-eslint/typescript-estree` >= 3.5.0
2424
- `eslint`
2525

26-
**If your @typescript-eslint tool's version is < 3.0.0, install`[email protected]`.**
27-
2826
### Install
2927

3028
```sh
@@ -68,6 +66,11 @@ By default, this plugins watches only `.eslintrc.*` files that exist in your pro
6866

6967
- Set `TS_ESLINT_SERVICE_DISABLED` env parameter and restart your IDE to turn this plugin off.
7068

69+
### If you use older version of `@typescript-eslint` packages
70+
71+
- **If your @typescript-eslint tool's version is <= 3.4.0, install `[email protected]`.**
72+
- **If your @typescript-eslint tool's version is <= 2.x.x, install `[email protected]`.**
73+
7174
## LICENSE
7275

7376
MIT

e2e/projects/other-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"@babel/core": "^7.7.4",
99
"babel-eslint": "^10.0.3",
1010
"eslint": "^7.0.0",
11-
"typescript": "^3.9.0"
11+
"typescript": "4.0.1-rc"
1212
}
1313
}

e2e/projects/simple/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"test": "echo \"Error: no test specified\" && exit 1"
66
},
77
"devDependencies": {
8-
"@typescript-eslint/parser": "^3.0.0",
8+
"@typescript-eslint/parser": "~3.9.0",
99
"eslint": "^7.0.0",
10-
"typescript": "^3.9.0"
10+
"typescript": "4.0.1-rc"
1111
}
1212
}

e2e/projects/ts-eslint-plugin/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"test": "echo \"Error: no test specified\" && exit 1"
66
},
77
"devDependencies": {
8-
"@typescript-eslint/eslint-plugin": "~3.4.0",
9-
"@typescript-eslint/parser": "~3.4.0",
8+
"@typescript-eslint/eslint-plugin": "~3.9.0",
9+
"@typescript-eslint/parser": "~3.9.0",
1010
"eslint": "^7.0.0",
11-
"typescript": "^3.9.0"
11+
"typescript": "4.0.1-rc"
1212
}
1313
}

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
"url": "https://github.com/Quramy/typescript-eslint-language-service/issues"
2929
},
3030
"pperDependencies": {
31-
"@typescript-eslint/parser": ">= 3.0.2 <= 3.4.x",
32-
"@typescript-eslint/typescript-estree": ">= 3.0.2 <= 3.4.x",
31+
"@typescript-eslint/parser": ">= 3.5.0",
32+
"@typescript-eslint/typescript-estree": ">= 3.5.0",
3333
"eslint": ">= 6.7.0 <= 6.8.x || >= 7.0.0",
3434
"typescript": "^3.0.0"
3535
},
@@ -38,9 +38,9 @@
3838
"@types/eslint": "^6.1.3",
3939
"@types/jest": "^25.1.4",
4040
"@types/node": "^14.0.6",
41-
"@typescript-eslint/eslint-plugin": "~3.4.0",
42-
"@typescript-eslint/parser": "~3.8.0",
43-
"@typescript-eslint/typescript-estree": "~3.4.0",
41+
"@typescript-eslint/eslint-plugin": "~3.9.0",
42+
"@typescript-eslint/parser": "~3.9.0",
43+
"@typescript-eslint/typescript-estree": "~3.9.0",
4444
"eslint": "^7.0.0",
4545
"eslint-config-prettier": "^6.11.0",
4646
"fretted-strings": "^1.0.0",
@@ -50,7 +50,7 @@
5050
"pretty-quick": "^2.0.1",
5151
"rimraf": "^3.0.0",
5252
"ts-jest": "^26.0.0",
53-
"typescript": "~3.9.0"
53+
"typescript": "4.0.1-rc"
5454
},
5555
"husky": {
5656
"hooks": {

src/ast-converter.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import ts from "typescript";
22
import { AstConverter } from "./ast-converter";
33
import { SourceCode } from "eslint";
4-
import { visitorKeys as tsEslintVisitorKeys } from "@typescript-eslint/typescript-estree/dist/visitor-keys";
4+
import { visitorKeys as tsEslintVisitorKeys } from "@typescript-eslint/visitor-keys";
55

66
function createProgram() {
77
return ts.createProgram({

src/ast-converter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { SourceCode, AST, Scope } from "eslint";
33
import { ParserOptions } from "@typescript-eslint/parser";
44
import { analyzeScope } from "@typescript-eslint/parser/dist/analyze-scope";
55
import { Extra } from "@typescript-eslint/typescript-estree/dist/parser-options";
6-
import { visitorKeys } from "@typescript-eslint/typescript-estree/dist/visitor-keys";
6+
import { visitorKeys } from "@typescript-eslint/visitor-keys";
77
import { ParseAndGenerateServicesResult, TSESTreeOptions } from "@typescript-eslint/typescript-estree";
88
import * as TsEstree from "@typescript-eslint/typescript-estree/dist/ast-converter";
99

src/eslint-config-provider.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class FileUpdater {
3737
fs.writeFileSync(this.path, this.originalContent, "utf8");
3838
delete this.originalContent;
3939
}
40-
delete this.path;
40+
delete (this as any).path;
4141
this.callbackList = [];
4242
}
4343

yarn.lock

Lines changed: 36 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -609,86 +609,63 @@
609609
dependencies:
610610
"@types/yargs-parser" "*"
611611

612-
"@typescript-eslint/eslint-plugin@~3.4.0":
613-
version "3.4.0"
614-
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.4.0.tgz#8378062e6be8a1d049259bdbcf27ce5dfbeee62b"
615-
integrity sha512-wfkpiqaEVhZIuQRmudDszc01jC/YR7gMSxa6ulhggAe/Hs0KVIuo9wzvFiDbG3JD5pRFQoqnf4m7REDsUvBnMQ==
612+
"@typescript-eslint/eslint-plugin@~3.9.0":
613+
version "3.9.0"
614+
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.9.0.tgz#0fe529b33d63c9a94f7503ca2bb12c84b9477ff3"
615+
integrity sha512-UD6b4p0/hSe1xdTvRCENSx7iQ+KR6ourlZFfYuPC7FlXEzdHuLPrEmuxZ23b2zW96KJX9Z3w05GE/wNOiEzrVg==
616616
dependencies:
617-
"@typescript-eslint/experimental-utils" "3.4.0"
617+
"@typescript-eslint/experimental-utils" "3.9.0"
618618
debug "^4.1.1"
619619
functional-red-black-tree "^1.0.1"
620620
regexpp "^3.0.0"
621621
semver "^7.3.2"
622622
tsutils "^3.17.1"
623623

624-
"@typescript-eslint/experimental-utils@3.4.0":
625-
version "3.4.0"
626-
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.4.0.tgz#8a44dfc6fb7f1d071937b390fe27608ebda122b8"
627-
integrity sha512-rHPOjL43lOH1Opte4+dhC0a/+ks+8gOBwxXnyrZ/K4OTAChpSjP76fbI8Cglj7V5GouwVAGaK+xVwzqTyE/TPw==
624+
"@typescript-eslint/experimental-utils@3.9.0":
625+
version "3.9.0"
626+
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.9.0.tgz#3171d8ddba0bf02a8c2034188593630914fcf5ee"
627+
integrity sha512-/vSHUDYizSOhrOJdjYxPNGfb4a3ibO8zd4nUKo/QBFOmxosT3cVUV7KIg8Dwi6TXlr667G7YPqFK9+VSZOorNA==
628628
dependencies:
629629
"@types/json-schema" "^7.0.3"
630-
"@typescript-eslint/typescript-estree" "3.4.0"
630+
"@typescript-eslint/types" "3.9.0"
631+
"@typescript-eslint/typescript-estree" "3.9.0"
631632
eslint-scope "^5.0.0"
632633
eslint-utils "^2.0.0"
633634

634-
"@typescript-eslint/[email protected]":
635-
version "3.8.0"
636-
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.8.0.tgz#ac1f7c88322dcfb7635ece6f0441516dd951099a"
637-
integrity sha512-o8T1blo1lAJE0QDsW7nSyvZHbiDzQDjINJKyB44Z3sSL39qBy5L10ScI/XwDtaiunoyKGLiY9bzRk4YjsUZl8w==
638-
dependencies:
639-
"@types/json-schema" "^7.0.3"
640-
"@typescript-eslint/types" "3.8.0"
641-
"@typescript-eslint/typescript-estree" "3.8.0"
642-
eslint-scope "^5.0.0"
643-
eslint-utils "^2.0.0"
644-
645-
"@typescript-eslint/parser@~3.8.0":
646-
version "3.8.0"
647-
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.8.0.tgz#8e1dcd404299bf79492409c81c415fa95a7c622b"
648-
integrity sha512-u5vjOBaCsnMVQOvkKCXAmmOhyyMmFFf5dbkM3TIbg3MZ2pyv5peE4gj81UAbTHwTOXEwf7eCQTUMKrDl/+qGnA==
635+
"@typescript-eslint/parser@~3.9.0":
636+
version "3.9.0"
637+
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.9.0.tgz#344978a265d9a5c7c8f13e62c78172a4374dabea"
638+
integrity sha512-rDHOKb6uW2jZkHQniUQVZkixQrfsZGUCNWWbKWep4A5hGhN5dLHMUCNAWnC4tXRlHedXkTDptIpxs6e4Pz8UfA==
649639
dependencies:
650640
"@types/eslint-visitor-keys" "^1.0.0"
651-
"@typescript-eslint/experimental-utils" "3.8.0"
652-
"@typescript-eslint/types" "3.8.0"
653-
"@typescript-eslint/typescript-estree" "3.8.0"
641+
"@typescript-eslint/experimental-utils" "3.9.0"
642+
"@typescript-eslint/types" "3.9.0"
643+
"@typescript-eslint/typescript-estree" "3.9.0"
654644
eslint-visitor-keys "^1.1.0"
655645

656-
"@typescript-eslint/[email protected]":
657-
version "3.8.0"
658-
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.8.0.tgz#58581dd863f86e0cd23353d94362bb90b4bea796"
659-
integrity sha512-8kROmEQkv6ss9kdQ44vCN1dTrgu4Qxrd2kXr10kz2NP5T8/7JnEfYNxCpPkArbLIhhkGLZV3aVMplH1RXQRF7Q==
660-
661-
"@typescript-eslint/[email protected]", "@typescript-eslint/typescript-estree@~3.4.0":
662-
version "3.4.0"
663-
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.4.0.tgz#6a787eb70b48969e4cd1ea67b057083f96dfee29"
664-
integrity sha512-zKwLiybtt4uJb4mkG5q2t6+W7BuYx2IISiDNV+IY68VfoGwErDx/RfVI7SWL4gnZ2t1A1ytQQwZ+YOJbHHJ2rw==
665-
dependencies:
666-
debug "^4.1.1"
667-
eslint-visitor-keys "^1.1.0"
668-
glob "^7.1.6"
669-
is-glob "^4.0.1"
670-
lodash "^4.17.15"
671-
semver "^7.3.2"
672-
tsutils "^3.17.1"
646+
"@typescript-eslint/[email protected]":
647+
version "3.9.0"
648+
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.9.0.tgz#be9d0aa451e1bf3ce99f2e6920659e5b2e6bfe18"
649+
integrity sha512-rb6LDr+dk9RVVXO/NJE8dT1pGlso3voNdEIN8ugm4CWM5w5GimbThCMiMl4da1t5u3YwPWEwOnKAULCZgBtBHg==
673650

674-
"@typescript-eslint/typescript-estree@3.8.0":
675-
version "3.8.0"
676-
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.8.0.tgz#0606d19f629f813dbdd5a34c7a1e895d6191cac6"
677-
integrity sha512-MTv9nPDhlKfclwnplRNDL44mP2SY96YmPGxmMbMy6x12I+pERcxpIUht7DXZaj4mOKKtet53wYYXU0ABaiXrLw==
651+
"@typescript-eslint/typescript-estree@3.9.0", "@typescript-eslint/typescript-estree@~3.9.0":
652+
version "3.9.0"
653+
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.9.0.tgz#c6abbb50fa0d715cab46fef67ca6378bf2eaca13"
654+
integrity sha512-N+158NKgN4rOmWVfvKOMoMFV5n8XxAliaKkArm/sOypzQ0bUL8MSnOEBW3VFIeffb/K5ce/cAV0yYhR7U4ALAA==
678655
dependencies:
679-
"@typescript-eslint/types" "3.8.0"
680-
"@typescript-eslint/visitor-keys" "3.8.0"
656+
"@typescript-eslint/types" "3.9.0"
657+
"@typescript-eslint/visitor-keys" "3.9.0"
681658
debug "^4.1.1"
682659
glob "^7.1.6"
683660
is-glob "^4.0.1"
684661
lodash "^4.17.15"
685662
semver "^7.3.2"
686663
tsutils "^3.17.1"
687664

688-
"@typescript-eslint/visitor-keys@3.8.0":
689-
version "3.8.0"
690-
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.8.0.tgz#ad35110249fb3fc30a36bfcbfeea93e710cfaab1"
691-
integrity sha512-gfqQWyVPpT9NpLREXNR820AYwgz+Kr1GuF3nf1wxpHD6hdxI62tq03ToomFnDxY0m3pUB39IF7sil7D5TQexLA==
665+
"@typescript-eslint/visitor-keys@3.9.0":
666+
version "3.9.0"
667+
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.9.0.tgz#44de8e1b1df67adaf3b94d6b60b80f8faebc8dd3"
668+
integrity sha512-O1qeoGqDbu0EZUC/MZ6F1WHTIzcBVhGqDj3LhTnj65WUA548RXVxUHbYhAW9bZWfb2rnX9QsbbP5nmeJ5Z4+ng==
692669
dependencies:
693670
eslint-visitor-keys "^1.1.0"
694671

@@ -4120,10 +4097,10 @@ typedarray-to-buffer@^3.1.5:
41204097
dependencies:
41214098
is-typedarray "^1.0.0"
41224099

4123-
typescript@~3.9.0:
4124-
version "3.9.3"
4125-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.3.tgz#d3ac8883a97c26139e42df5e93eeece33d610b8a"
4126-
integrity sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ==
4100+
typescript@4.0.1-rc:
4101+
version "4.0.1-rc"
4102+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.1-rc.tgz#8adc78223eae56fe71d906a5fa90c3543b07a677"
4103+
integrity sha512-TCkspT3dSKOykbzS3/WSK7pqU2h1d/lEO6i45Afm5Y3XNAEAo8YXTG3kHOQk/wFq/5uPyO1+X8rb/Q+g7UsxJw==
41274104

41284105
union-value@^1.0.0:
41294106
version "1.0.1"

0 commit comments

Comments
 (0)