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 4, 2021
1 parent cfb749d commit 3d4832c
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.14",
"@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.14":
version "7.12.14"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.14.tgz#4adb7c5eef1d437ef965ad1569cd826db8c11dc9"
integrity sha512-xcfxDq3OrBnDsA/Z8eK5/2iPcLD8qbOaSSfOw4RA6jp4i7e6dEQ7+wTwxItEwzcXPQcsry5nZk96gmVPKletjQ==

"@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 3d4832c

Please sign in to comment.