no-new-func

This commit is contained in:
Alexander T 2019-06-14 11:02:15 +03:00
parent 12e195c24e
commit 4e6fb72737
3 changed files with 3 additions and 3 deletions

View File

@ -88,7 +88,7 @@
"no-fallthrough": "off",
"no-invalid-this": "off",
"no-multiple-empty-lines": "off",
"no-new-func": "off",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-redeclare": "off",
"no-return-await": "error",

View File

@ -600,7 +600,7 @@ namespace FourSlash {
throw new Error("Expected exactly one output from emit of " + this.activeFile.fileName);
}
const evaluation = new Function(`${emit.outputFiles[0].text};\r\nreturn (${expr});`)(); // tslint:disable-line:function-constructor
const evaluation = new Function(`${emit.outputFiles[0].text};\r\nreturn (${expr});`)(); // eslint-disable-line no-new-func
if (evaluation !== value) {
this.raiseError(`Expected evaluation of expression "${expr}" to equal "${value}", but got "${evaluation}"`);
}

View File

@ -28,7 +28,7 @@ var assert: typeof _chai.assert = _chai.assert;
};
}
var global: NodeJS.Global = Function("return this").call(undefined); // tslint:disable-line:function-constructor
var global: NodeJS.Global = Function("return this").call(undefined); // eslint-disable-line no-new-func
declare var window: {};
declare var XMLHttpRequest: new() => XMLHttpRequest;