Skip to content

Commit 4e6fb72

Browse files
committed
no-new-func
1 parent 12e195c commit 4e6fb72

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"no-fallthrough": "off",
8989
"no-invalid-this": "off",
9090
"no-multiple-empty-lines": "off",
91-
"no-new-func": "off",
91+
"no-new-func": "error",
9292
"no-new-wrappers": "error",
9393
"no-redeclare": "off",
9494
"no-return-await": "error",

src/harness/fourslash.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ namespace FourSlash {
600600
throw new Error("Expected exactly one output from emit of " + this.activeFile.fileName);
601601
}
602602

603-
const evaluation = new Function(`${emit.outputFiles[0].text};\r\nreturn (${expr});`)(); // tslint:disable-line:function-constructor
603+
const evaluation = new Function(`${emit.outputFiles[0].text};\r\nreturn (${expr});`)(); // eslint-disable-line no-new-func
604604
if (evaluation !== value) {
605605
this.raiseError(`Expected evaluation of expression "${expr}" to equal "${value}", but got "${evaluation}"`);
606606
}

src/harness/harness.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var assert: typeof _chai.assert = _chai.assert;
2828
};
2929
}
3030

31-
var global: NodeJS.Global = Function("return this").call(undefined); // tslint:disable-line:function-constructor
31+
var global: NodeJS.Global = Function("return this").call(undefined); // eslint-disable-line no-new-func
3232

3333
declare var window: {};
3434
declare var XMLHttpRequest: new() => XMLHttpRequest;

0 commit comments

Comments
 (0)