Skip to content

Commit

Permalink
[INTERNAL] Disallow eval in common ESLint config
Browse files Browse the repository at this point in the history
  • Loading branch information
maxreichmann committed Aug 1, 2024
1 parent 450e1c3 commit 331ed52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions eslint.common.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export default [{
"comma-dangle": "off",
"no-tabs": "off",
"no-console": 2, // Disallow console.log()
"no-eval": 2,
// The following rule must be disabled as of ESLint 9.
// It's removed and causes issues when present
// https://eslint.org/docs/latest/rules/valid-jsdoc
Expand Down
2 changes: 1 addition & 1 deletion test/lib/lbt/utils/JSTokenizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test("valid expressions", function(t) {
];
for (let i = 0; i < list.length; i++) {
let evalResult;
eval("evalResult=" + list[i]);
eval("evalResult=" + list[i]); // eslint-disable-line no-eval
t.deepEqual(JSTokenizer.parseJS(list[i]), evalResult, "Parse " + list[i]);
}
});
Expand Down

0 comments on commit 331ed52

Please sign in to comment.