mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
no-new-func
This commit is contained in:
parent
12e195c24e
commit
4e6fb72737
@ -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",
|
||||
|
||||
@ -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}"`);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user