chore: update typescript-estree to new package name (#5799)
parent
7faa2608c1
commit
1143619600
|
@ -183,7 +183,7 @@ Valid options:
|
|||
- `"babel"` (via [@babel/parser](https://github.com/babel/babel/tree/master/packages/babel-parser)) _Named `"babylon"` until v1.16.0_
|
||||
- `"babel-flow"` (Same as `"babel"` but enables Flow parsing explicitly to avoid ambiguity) _First available in v1.16.0_
|
||||
- `"flow"` (via [flow-parser](https://github.com/facebook/flow/tree/master/src/parser))
|
||||
- `"typescript"` (via [typescript-estree](https://github.com/JamesHenry/typescript-estree)) _First available in v1.4.0_
|
||||
- `"typescript"` (via [@typescript-eslint/typescript-estree](https://github.com/typescript-eslint/typescript-eslint)) _First available in v1.4.0_
|
||||
- `"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_
|
||||
- `"scss"` (same parsers as `"css"`, prefers postcss-scss) _First available in v1.7.1_
|
||||
- `"less"` (same parsers as `"css"`, prefers postcss-less) _First available in v1.7.1_
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
"@babel/parser": "7.2.0",
|
||||
"@glimmer/syntax": "0.30.3",
|
||||
"@iarna/toml": "2.0.0",
|
||||
"@typescript-eslint/typescript-estree": "1.1.0",
|
||||
"angular-estree-parser": "1.1.5",
|
||||
"angular-html-parser": "1.2.0",
|
||||
"camelcase": "4.1.0",
|
||||
|
@ -66,7 +67,6 @@
|
|||
"semver": "5.4.1",
|
||||
"string-width": "3.0.0",
|
||||
"typescript": "3.2.2",
|
||||
"typescript-estree": "18.0.0",
|
||||
"unicode-regex": "2.0.0",
|
||||
"unified": "6.1.6",
|
||||
"vnopts": "1.0.2",
|
||||
|
|
|
@ -39,7 +39,7 @@ const parsers = [
|
|||
input: "src/language-js/parser-typescript.js",
|
||||
target: "universal",
|
||||
replace: {
|
||||
// node v4 compatibility for typescript-estree
|
||||
// node v4 compatibility for @typescript-eslint/typescript-estree
|
||||
"(!unique.includes(raw))": "(unique.indexOf(raw) === -1)"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -282,7 +282,6 @@ function needsParens(path, options) {
|
|||
|
||||
case "ClassExpression":
|
||||
case "ClassDeclaration":
|
||||
case "TSAbstractClassDeclaration":
|
||||
return name === "superClass" && parent.superClass === node;
|
||||
case "TSTypeAssertion":
|
||||
case "TaggedTemplateExpression":
|
||||
|
@ -719,7 +718,6 @@ function isStatement(node) {
|
|||
node.type === "SwitchStatement" ||
|
||||
node.type === "ThrowStatement" ||
|
||||
node.type === "TryStatement" ||
|
||||
node.type === "TSAbstractClassDeclaration" ||
|
||||
node.type === "TSDeclareFunction" ||
|
||||
node.type === "TSEnumDeclaration" ||
|
||||
node.type === "TSImportEqualsDeclaration" ||
|
||||
|
|
|
@ -36,7 +36,7 @@ function parse(text, parsers, opts) {
|
|||
}
|
||||
|
||||
function tryParseTypeScript(text, jsx) {
|
||||
const parser = require("typescript-estree");
|
||||
const parser = require("@typescript-eslint/typescript-estree");
|
||||
return parser.parse(text, {
|
||||
loc: true,
|
||||
range: true,
|
||||
|
|
|
@ -2346,7 +2346,6 @@ function printPathNoParens(path, options, print, args) {
|
|||
}
|
||||
case "ClassDeclaration":
|
||||
case "ClassExpression":
|
||||
case "TSAbstractClassDeclaration":
|
||||
if (isNodeStartingWithDeclare(n, options)) {
|
||||
parts.push("declare ");
|
||||
}
|
||||
|
@ -4359,7 +4358,6 @@ function printExportDeclaration(path, options, print) {
|
|||
isDefault &&
|
||||
(decl.declaration.type !== "ClassDeclaration" &&
|
||||
decl.declaration.type !== "FunctionDeclaration" &&
|
||||
decl.declaration.type !== "TSAbstractClassDeclaration" &&
|
||||
decl.declaration.type !== "TSInterfaceDeclaration" &&
|
||||
decl.declaration.type !== "DeclareClass" &&
|
||||
decl.declaration.type !== "DeclareFunction" &&
|
||||
|
@ -4526,7 +4524,7 @@ function printClass(path, options, print) {
|
|||
const n = path.getValue();
|
||||
const parts = [];
|
||||
|
||||
if (n.type === "TSAbstractClassDeclaration") {
|
||||
if (n.abstract) {
|
||||
parts.push("abstract ");
|
||||
}
|
||||
|
||||
|
|
16
yarn.lock
16
yarn.lock
|
@ -674,6 +674,14 @@
|
|||
version "5.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45"
|
||||
|
||||
"@typescript-eslint/typescript-estree@1.1.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.1.0.tgz#31f19e7197814cb3e609f2822ad6003b6e326470"
|
||||
integrity sha512-eABnKqJVv0Mm5uYon8Xw61SXldvOhWKDQdoZqsJ/YqEa9XvWV1URXdRvTOW8GLsKo4X3Un7pHKqKZhfbbUEGww==
|
||||
dependencies:
|
||||
lodash.unescape "4.0.1"
|
||||
semver "5.5.0"
|
||||
|
||||
abab@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e"
|
||||
|
@ -5764,14 +5772,6 @@ typedarray@^0.0.6:
|
|||
version "0.0.6"
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
|
||||
typescript-estree@18.0.0:
|
||||
version "18.0.0"
|
||||
resolved "https://registry.yarnpkg.com/typescript-estree/-/typescript-estree-18.0.0.tgz#a309f6c6502c64d74b3f88c205d871a9af0b1d40"
|
||||
integrity sha512-HxTWrzFyYOPWA91Ij7xL9mNUVpGTKLH2KiaBn28CMbYgX2zgWdJqU9hO7Are+pAPAqY91NxAYoaAyDDZ3rLj2A==
|
||||
dependencies:
|
||||
lodash.unescape "4.0.1"
|
||||
semver "5.5.0"
|
||||
|
||||
typescript@3.2.2:
|
||||
version "3.2.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.2.tgz#fe8101c46aa123f8353523ebdcf5730c2ae493e5"
|
||||
|
|
Loading…
Reference in New Issue