node_modules/eslint/lib/rules/no-eval.js in immosquare-cleaner-0.1.51 vs node_modules/eslint/lib/rules/no-eval.js in immosquare-cleaner-0.1.52
- old
+ new
@@ -40,21 +40,23 @@
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
type: "suggestion",
+ defaultOptions: [{}],
+
docs: {
description: "Disallow the use of `eval()`",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-eval"
},
schema: [
{
type: "object",
properties: {
- allowIndirect: { type: "boolean", default: false }
+ allowIndirect: { type: "boolean" }
},
additionalProperties: false
}
],
@@ -62,13 +64,10 @@
unexpected: "eval can be harmful."
}
},
create(context) {
- const allowIndirect = Boolean(
- context.options[0] &&
- context.options[0].allowIndirect
- );
+ const [{ allowIndirect }] = context.options;
const sourceCode = context.sourceCode;
let funcInfo = null;
/**
* Pushes a `this` scope (non-arrow function, class static block, or class field initializer) information to the stack.