We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e2ff68 commit 0f54433Copy full SHA for 0f54433
src/lib/complexity/strategies/cyclomatic.ts
@@ -37,7 +37,10 @@ function fromJavaScript(path: string): number {
37
function fromTypeScript(path: string): number {
38
const content = readFileSync(path, { encoding: "utf8" });
39
const babelResult = transformSync(content, {
40
- plugins: ["@babel/plugin-transform-typescript"],
+ plugins: [
41
+ "@babel/plugin-transform-typescript",
42
+ ["@babel/plugin-proposal-decorators", { legacy: true }],
43
+ ],
44
presets: ["@babel/preset-env"],
45
});
46
if (!babelResult) throw new Error(`Error while parsing file ${path}`);
0 commit comments