Skip to content

Commit

Permalink
test(typescript-estree): remove AST transformation of chain elements (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Feb 5, 2021
1 parent 898dd39 commit ee927ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 21 deletions.
2 changes: 1 addition & 1 deletion packages/typescript-estree/package.json
Expand Up @@ -52,7 +52,7 @@
},
"devDependencies": {
"@babel/code-frame": "^7.12.11",
"@babel/parser": "^7.12.11",
"@babel/parser": "^7.12.15",
"@babel/types": "^7.12.12",
"@types/babel__code-frame": "^7.0.2",
"@types/debug": "*",
Expand Down
20 changes: 0 additions & 20 deletions packages/typescript-estree/tests/ast-alignment/utils.ts
Expand Up @@ -236,26 +236,6 @@ export function preprocessBabylonAST(ast: BabelTypes.File): any {
}
}
},
/**
* TS 3.7: optional chaining
* babel: sets optional property as true/undefined
* ts-estree: sets optional property as true/false
*/
MemberExpression(node) {
if (!node.optional) {
node.optional = false;
}
},
CallExpression(node) {
if (!node.optional) {
node.optional = false;
}
},
OptionalCallExpression(node) {
if (!node.optional) {
node.optional = false;
}
},
},
);
}
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Expand Up @@ -148,6 +148,11 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.11.tgz#9ce3595bcd74bc5c466905e86c535b8b25011e79"
integrity sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg==

"@babel/parser@^7.12.15":
version "7.12.15"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.15.tgz#2b20de7f0b4b332d9b119dd9c33409c538b8aacf"
integrity sha512-AQBOU2Z9kWwSZMd6lNjCX0GUgFonL1wAM1db8L8PMk9UDaGsRCArBkU4Sc+UCM3AE4hjbXx+h58Lb3QT4oRmrA==

"@babel/plugin-syntax-async-generators@^7.8.4":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d"
Expand Down

0 comments on commit ee927ee

Please sign in to comment.