Skip to content

Commit 1cc0ff2

Browse files
committed
no-eval
1 parent 123ca0d commit 1cc0ff2

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"no-duplicate-case": "error",
8484
"no-duplicate-imports": "error",
8585
"no-empty": "error",
86-
"no-eval": "off",
86+
"no-eval": "error",
8787
"no-extra-bind": "error",
8888
"no-fallthrough": "off",
8989
"no-invalid-this": "off",

src/harness/evaluator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace evaluator {
5656
}
5757

5858
const evaluateText = `(function (module, exports, require, __dirname, __filename, ${globalNames.join(", ")}) { ${output.text} })`;
59-
// tslint:disable-next-line:no-eval
59+
// eslint-disable-next-line no-eval
6060
const evaluateThunk = eval(evaluateText) as (module: any, exports: any, require: (id: string) => any, dirname: string, filename: string, ...globalArgs: any[]) => void;
6161
const module: { exports: any; } = { exports: {} };
6262
evaluateThunk.call(globals, module, module.exports, noRequire, vpath.dirname(output.file), output.file, FakeSymbol, ...globalArgs);
@@ -66,4 +66,4 @@ namespace evaluator {
6666
export function evaluateTypeScript(sourceText: string, options?: ts.CompilerOptions, globals?: Record<string, any>) {
6767
return evaluate(compile(sourceText, options), globals);
6868
}
69-
}
69+
}

src/harness/fourslash.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3193,7 +3193,7 @@ ${code}
31933193
const debug = new FourSlashInterface.Debug(state);
31943194
const format = new FourSlashInterface.Format(state);
31953195
const cancellation = new FourSlashInterface.Cancellation(state);
3196-
// tslint:disable-next-line:no-eval
3196+
// eslint-disable-next-line no-eval
31973197
const f = eval(wrappedCode);
31983198
f(test, goTo, plugins, verify, edit, debug, format, cancellation, FourSlashInterface.Classification, FourSlashInterface.Completion, verifyOperationIsCancelled);
31993199
}

0 commit comments

Comments
 (0)