Skip to content

Commit 1143619

Browse files
authored
chore: update typescript-estree to new package name (#5799)
1 parent 7faa260 commit 1143619

7 files changed

Lines changed: 13 additions & 17 deletions

File tree

docs/options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ Valid options:
183183
- `"babel"` (via [@babel/parser](https://github.com/babel/babel/tree/master/packages/babel-parser)) _Named `"babylon"` until v1.16.0_
184184
- `"babel-flow"` (Same as `"babel"` but enables Flow parsing explicitly to avoid ambiguity) _First available in v1.16.0_
185185
- `"flow"` (via [flow-parser](https://github.com/facebook/flow/tree/master/src/parser))
186-
- `"typescript"` (via [typescript-estree](https://github.com/JamesHenry/typescript-estree)) _First available in v1.4.0_
186+
- `"typescript"` (via [@typescript-eslint/typescript-estree](https://github.com/typescript-eslint/typescript-eslint)) _First available in v1.4.0_
187187
- `"css"` (via [postcss-scss](https://github.com/postcss/postcss-scss) and [postcss-less](https://github.com/shellscape/postcss-less), autodetects which to use) _First available in v1.7.1_
188188
- `"scss"` (same parsers as `"css"`, prefers postcss-scss) _First available in v1.7.1_
189189
- `"less"` (same parsers as `"css"`, prefers postcss-less) _First available in v1.7.1_

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@babel/parser": "7.2.0",
2020
"@glimmer/syntax": "0.30.3",
2121
"@iarna/toml": "2.0.0",
22+
"@typescript-eslint/typescript-estree": "1.1.0",
2223
"angular-estree-parser": "1.1.5",
2324
"angular-html-parser": "1.2.0",
2425
"camelcase": "4.1.0",
@@ -66,7 +67,6 @@
6667
"semver": "5.4.1",
6768
"string-width": "3.0.0",
6869
"typescript": "3.2.2",
69-
"typescript-estree": "18.0.0",
7070
"unicode-regex": "2.0.0",
7171
"unified": "6.1.6",
7272
"vnopts": "1.0.2",

scripts/build/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const parsers = [
3939
input: "src/language-js/parser-typescript.js",
4040
target: "universal",
4141
replace: {
42-
// node v4 compatibility for typescript-estree
42+
// node v4 compatibility for @typescript-eslint/typescript-estree
4343
"(!unique.includes(raw))": "(unique.indexOf(raw) === -1)"
4444
}
4545
},

src/language-js/needs-parens.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@ function needsParens(path, options) {
282282

283283
case "ClassExpression":
284284
case "ClassDeclaration":
285-
case "TSAbstractClassDeclaration":
286285
return name === "superClass" && parent.superClass === node;
287286
case "TSTypeAssertion":
288287
case "TaggedTemplateExpression":
@@ -719,7 +718,6 @@ function isStatement(node) {
719718
node.type === "SwitchStatement" ||
720719
node.type === "ThrowStatement" ||
721720
node.type === "TryStatement" ||
722-
node.type === "TSAbstractClassDeclaration" ||
723721
node.type === "TSDeclareFunction" ||
724722
node.type === "TSEnumDeclaration" ||
725723
node.type === "TSImportEqualsDeclaration" ||

src/language-js/parser-typescript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function parse(text, parsers, opts) {
3636
}
3737

3838
function tryParseTypeScript(text, jsx) {
39-
const parser = require("typescript-estree");
39+
const parser = require("@typescript-eslint/typescript-estree");
4040
return parser.parse(text, {
4141
loc: true,
4242
range: true,

src/language-js/printer-estree.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,7 +2346,6 @@ function printPathNoParens(path, options, print, args) {
23462346
}
23472347
case "ClassDeclaration":
23482348
case "ClassExpression":
2349-
case "TSAbstractClassDeclaration":
23502349
if (isNodeStartingWithDeclare(n, options)) {
23512350
parts.push("declare ");
23522351
}
@@ -4359,7 +4358,6 @@ function printExportDeclaration(path, options, print) {
43594358
isDefault &&
43604359
(decl.declaration.type !== "ClassDeclaration" &&
43614360
decl.declaration.type !== "FunctionDeclaration" &&
4362-
decl.declaration.type !== "TSAbstractClassDeclaration" &&
43634361
decl.declaration.type !== "TSInterfaceDeclaration" &&
43644362
decl.declaration.type !== "DeclareClass" &&
43654363
decl.declaration.type !== "DeclareFunction" &&
@@ -4526,7 +4524,7 @@ function printClass(path, options, print) {
45264524
const n = path.getValue();
45274525
const parts = [];
45284526

4529-
if (n.type === "TSAbstractClassDeclaration") {
4527+
if (n.abstract) {
45304528
parts.push("abstract ");
45314529
}
45324530

yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,14 @@
674674
version "5.5.0"
675675
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45"
676676

677+
"@typescript-eslint/[email protected]":
678+
version "1.1.0"
679+
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.1.0.tgz#31f19e7197814cb3e609f2822ad6003b6e326470"
680+
integrity sha512-eABnKqJVv0Mm5uYon8Xw61SXldvOhWKDQdoZqsJ/YqEa9XvWV1URXdRvTOW8GLsKo4X3Un7pHKqKZhfbbUEGww==
681+
dependencies:
682+
lodash.unescape "4.0.1"
683+
semver "5.5.0"
684+
677685
abab@^1.0.4:
678686
version "1.0.4"
679687
resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e"
@@ -5764,14 +5772,6 @@ typedarray@^0.0.6:
57645772
version "0.0.6"
57655773
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
57665774

5767-
5768-
version "18.0.0"
5769-
resolved "https://registry.yarnpkg.com/typescript-estree/-/typescript-estree-18.0.0.tgz#a309f6c6502c64d74b3f88c205d871a9af0b1d40"
5770-
integrity sha512-HxTWrzFyYOPWA91Ij7xL9mNUVpGTKLH2KiaBn28CMbYgX2zgWdJqU9hO7Are+pAPAqY91NxAYoaAyDDZ3rLj2A==
5771-
dependencies:
5772-
lodash.unescape "4.0.1"
5773-
semver "5.5.0"
5774-
57755775
57765776
version "3.2.2"
57775777
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.2.tgz#fe8101c46aa123f8353523ebdcf5730c2ae493e5"

0 commit comments

Comments
 (0)