From 8c248f6d6380b61143f6feea5bc53848e0adb5b0 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Fri, 5 Jan 2018 16:59:04 -0500 Subject: [PATCH] Breaking: Properly categorize constructors with no body --- lib/convert.js | 2 ++ tests/lib/__snapshots__/typescript.js.snap | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/convert.js b/lib/convert.js index 00eb207..d8f8215 100644 --- a/lib/convert.js +++ b/lib/convert.js @@ -1050,6 +1050,8 @@ module.exports = function convert(config) { result.accessibility = accessibility; } + namespaceEmptyBodyFunctionForESLint(result.value); + break; } diff --git a/tests/lib/__snapshots__/typescript.js.snap b/tests/lib/__snapshots__/typescript.js.snap index d4f07b2..6eeed6c 100644 --- a/tests/lib/__snapshots__/typescript.js.snap +++ b/tests/lib/__snapshots__/typescript.js.snap @@ -733,7 +733,7 @@ Object { 63, 66, ], - "type": "FunctionExpression", + "type": "TSEmptyBodyFunctionExpression", }, }, ],