ronantakizawa/codereview-bench huggingface dataset:
Repository: eslint/eslint
File: lib/rules/no-restricted-properties.js (JavaScript)

Code before:
						type: "string",
					},
				},
				anyOf: [
					{
						required: ["object"],
					},
					{
						required: ["property"],
					},
				],
				not: {
					anyOf: [
						{ required: ["allowObjects", "object"] },
						{ required: ["allowProperties", "property"] },
					],
				},
				additionalProperties: false,
			},
			uniqueItems: true,
		},

		messages: {
			restrictedObjectProperty:
				// eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
				"'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",
			restrictedProperty:
				// eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
				"'{{propertyName}}' is restricted from being used.{{message}}",
		},
	},

	create(context) {
		const restrictedCalls = context.options;

		if (restrictedCalls.length === 0) {
			return {};
		}

		const restrictedProperties = new Map();
		const globallyRestrictedObjects = new Map();
		const globallyRestrictedProperties = new Map();

		restrictedCalls.forEach(option => {
			const objectName = option.object;
			const propertyName = option.property;

			if (typeof objectName === "undefined") {
				globallyRestrictedProperties.set(propertyName, {
					allowObjects: option.allowObjects,
					message: option.message,

Review comment (suggestion):
Just want to double-check, do we need a space here?
```suggestion
				"'{{objectName}}.{{propertyName}}' is restricted from being used.{{allowedPropertiesMessage}} {{message}}",
```

Code after:
						type: "string",
					},
				},
				anyOf: [
					{
						required: ["object"],
					},
					{
						required: ["property"],
					},
				],
				not: {
					anyOf: [
						{ required: ["allowObjects", "object"] },
						{ required: ["allowProperties", "property"] },
					],
				},
				additionalProperties: false,
			},
			uniqueItems: true,
		},

		messages: {
			restrictedObjectProperty:
				// eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
				"'{{objectName}}.{{propertyName}}' is restricted from being used.{{allowedPropertiesMessage}}{{message}}",
			restrictedProperty:
				// eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
				"'{{propertyName}}' is restricted from being used.{{allowedObjectsMessage}}{{message}}",
		},
	},

	create(context) {
		const restrictedCalls = context.options;

		if (restrictedCalls.length === 0) {
			return {};
		}

		const restrictedProperties = new Map();
		const globallyRestrictedObjects = new Map();
		const globallyRestrictedProperties = new Map();

		restrictedCalls.forEach(option => {
			const objectName = option.object;
			const propertyName = option.property;

			if (typeof objectName === "undefined") {
				globallyRestrictedProperties.set(propertyName, {
					allowObjects: option.allowObjects,
					message: option.message,
Repository: eslint/eslint
File: lib/rules/no-restricted-properties.js (JavaScript)

Code before:
				anyOf: [
					{
						required: ["object"],
					},
					{
						required: ["property"],
					},
				],
				not: {
					anyOf: [
						{ required: ["allowObjects", "object"] },
						{ required: ["allowProperties", "property"] },
					],
				},
				additionalProperties: false,
			},
			uniqueItems: true,
		},

		messages: {
			restrictedObjectProperty:
				// eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
				"'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",
			restrictedProperty:
				// eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
				"'{{propertyName}}' is restricted from being used.{{message}}",
		},
	},

	create(context) {
		const restrictedCalls = context.options;

		if (restrictedCalls.length === 0) {
			return {};
		}

		const restrictedProperties = new Map();
		const globallyRestrictedObjects = new Map();
		const globallyRestrictedProperties = new Map();

		restrictedCalls.forEach(option => {
			const objectName = option.object;
			const propertyName = option.property;

			if (typeof objectName === "undefined") {
				globallyRestrictedProperties.set(propertyName, {
					allowObjects: option.allowObjects,
					message: option.message,
				});
			} else if (typeof propertyName === "undefined") {
				globallyRestrictedObjects.set(objectName, {

Review comment (suggestion):
Same question.
```suggestion
				"'{{propertyName}}' is restricted from being used.{{allowedObjectsMessage}} {{message}}",
```

Code after:
				anyOf: [
					{
						required: ["object"],
					},
					{
						required: ["property"],
					},
				],
				not: {
					anyOf: [
						{ required: ["allowObjects", "object"] },
						{ required: ["allowProperties", "property"] },
					],
				},
				additionalProperties: false,
			},
			uniqueItems: true,
		},

		messages: {
			restrictedObjectProperty:
				// eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
				"'{{objectName}}.{{propertyName}}' is restricted from being used.{{allowedPropertiesMessage}}{{message}}",
			restrictedProperty:
				// eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
				"'{{propertyName}}' is restricted from being used.{{allowedObjectsMessage}}{{message}}",
		},
	},

	create(context) {
		const restrictedCalls = context.options;

		if (restrictedCalls.length === 0) {
			return {};
		}

		const restrictedProperties = new Map();
		const globallyRestrictedObjects = new Map();
		const globallyRestrictedProperties = new Map();

		restrictedCalls.forEach(option => {
			const objectName = option.object;
			const propertyName = option.property;

			if (typeof objectName === "undefined") {
				globallyRestrictedProperties.set(propertyName, {
					allowObjects: option.allowObjects,
					message: option.message,
				});
			} else if (typeof propertyName === "undefined") {
				globallyRestrictedObjects.set(objectName, {
Repository: eslint/eslint
File: Makefile.js (JavaScript)

Code before:
			[
				"--shell=none",
				"--warmup=1",
				"--runs=5",
				"--command-name",
				`\x1b[1K\x1b[99D\x1b[1m${title}\x1b[0m`,
				command,
			],
			{ stdio: "inherit" },
		);
	} catch {
		exit(1);
	}
}

target.perf = () => {
	checkHyperfineInstallation();

	downloadMultifilesTestTarget();

	createConfigForPerformanceTest();

	// Empty line for better readability in the console output.
	console.log();

	const loadingCommand = `"${process.execPath}" --require "${require("./package.json").main}" ""`;
	runPerformanceTest("Loading", loadingCommand);

	const singleFileCommand = createESLintCommand(
		"tests/performance/jshint.js",
	);
	runPerformanceTest("Single File", singleFileCommand);

	const PERF_MULTIFILES_TARGETS = `${TEMP_DIR}eslint/performance/eslint/{lib,tests/lib}/**/*.js`;
	// Count test target files.
	const fileCount = glob.sync(PERF_MULTIFILES_TARGETS).length;
	const multiFilesCommand = createESLintCommand(PERF_MULTIFILES_TARGETS);
	runPerformanceTest(`Multi Files (${fileCount} files)`, multiFilesCommand);
};

target.generateRelease = ([packageTag]) => generateRelease({ packageTag });
target.generatePrerelease = ([prereleaseId]) =>
	generateRelease({ prereleaseId, packageTag: "next" });
target.publishRelease = publishRelease;


Review comment (performance):
Question for better understanding: what is the expected purpose of the `""` at the end of the command? When I run the command (`"C:\Program Files\nodejs\node.exe" --require "./lib/api.js" ""`) directly, Node.js prompts for input. Perhaps it was intended to be `--eval ""`? Though, I don't see any difference between `""` present, `""` omitted, and `--eval ""` when running `npm run test:performance`.

Code after:
			[
				"--shell=none",
				"--warmup=1",
				"--runs=5",
				"--command-name",
				`\x1b[1K\x1b[99D\x1b[1m${title}\x1b[0m`,
				command,
			],
			{ stdio: "inherit" },
		);
	} catch {
		exit(1);
	}
}

target.perf = () => {
	checkHyperfineInstallation();

	downloadMultifilesTestTarget();

	createConfigForPerformanceTest();

	// Empty line for better readability in the console output.
	console.log();

	const loadingCommand = `"${process.execPath}" "${require("./package.json").main}"`;
	runPerformanceTest("Loading", loadingCommand);

	const singleFileCommand = createESLintCommand(
		"tests/performance/jshint.js",
	);
	runPerformanceTest("Single File", singleFileCommand);

	const PERF_MULTIFILES_TARGETS = `${TEMP_DIR}eslint/performance/eslint/{lib,tests/lib}/**/*.js`;
	// Count test target files.
	const fileCount = glob.sync(PERF_MULTIFILES_TARGETS).length;
	const multiFilesCommand = createESLintCommand(PERF_MULTIFILES_TARGETS);
	runPerformanceTest(`Multi Files (${fileCount} files)`, multiFilesCommand);
};

target.generateRelease = ([packageTag]) => generateRelease({ packageTag });
target.generatePrerelease = ([prereleaseId]) =>
	generateRelease({ prereleaseId, packageTag: "next" });
target.publishRelease = publishRelease;
Repository: eslint/eslint
File: tools/check-emfile-handling.js (JavaScript)

Code before:

	if (failedResult?.reason) {
		throw failedResult.reason;
	}
}

//------------------------------------------------------------------------------
// Main
//------------------------------------------------------------------------------

console.log(`Generating ${FILE_COUNT} files in ${OUTPUT_DIRECTORY}...`);
generateFiles();

console.log("Running ESLint...");
execSync(
	`node bin/eslint.js ${OUTPUT_DIRECTORY} -c ${CONFIG_DIRECTORY}/eslint.config.js`,
	{ stdio: "inherit" },
);
console.log("✅ No errors encountered running ESLint.");

console.log("Running ESLint with --fix...");
execSync(
	`node bin/eslint.js ${OUTPUT_DIRECTORY} --fix --no-config-lookup --rule "eol-last: [error, always]"`,
	{ stdio: "inherit" },
);
console.log("✅ No errors encountered running ESLint with --fix.");

console.log(
	"Checking that this number of files would cause an EMFILE error...",
);
generateEmFileError()
	.then(() => {
		throw new Error("EMFILE error not encountered.");
	})
	.catch(error => {
		if (error.code === "EMFILE") {
			console.log("✅ EMFILE error encountered:", error.message);
		} else if (error.code === "ENFILE") {
			console.log("✅ ENFILE error encountered:", error.message);
		} else {
			console.error("❌ Unexpected error encountered:", error.message);
			throw error;
		}
	})
	.finally(() => {
		fs.rmSync(OUTPUT_DIRECTORY, {
			recursive: true,
			force: true,
			maxRetries: 8,
		});
	});

Review comment (suggestion):
I think it's not necessary to run ESLint twice. We could run it just once with the `--fix` option.

Also, the [`eol-last`](https://eslint.org/docs/latest/rules/eol-last) rule is deprecated, so it's probably better to use a different one for testing. It's also fine to change the content of the generated files to make sure it gets autofixed by one of the rules in the current config:

https://github.com/eslint/eslint/blob/f82e152b4300b067ab5870c73b5f10a8002eaa80/tools/check-emfile-handling.js#L66

Code after:

	if (failedResult?.reason) {
		throw failedResult.reason;
	}
}

//------------------------------------------------------------------------------
// Main
//------------------------------------------------------------------------------

console.log(`Generating ${FILE_COUNT} files in ${OUTPUT_DIRECTORY}...`);
generateFiles();

console.log("Running ESLint...");
execSync(
	`node bin/eslint.js ${OUTPUT_DIRECTORY} -c ${CONFIG_DIRECTORY}/eslint.config.js --fix`,
	{ stdio: "inherit" },
);
console.log("✅ No errors encountered running ESLint.");

console.log(
	"Checking that this number of files would cause an EMFILE error...",
);
generateEmFileError()
	.then(() => {
		throw new Error("EMFILE error not encountered.");
	})
	.catch(error => {
		if (error.code === "EMFILE") {
			console.log("✅ EMFILE error encountered:", error.message);
		} else if (error.code === "ENFILE") {
			console.log("✅ ENFILE error encountered:", error.message);
		} else {
			console.error("❌ Unexpected error encountered:", error.message);
			throw error;
		}
	})
	.finally(() => {
		fs.rmSync(OUTPUT_DIRECTORY, {
			recursive: true,
			force: true,
			maxRetries: 8,
		});
	});
Repository: eslint/eslint
File: tests/lib/rules/no-implied-eval.js (JavaScript)

Code before:
		{ code: "setTimeout;", languageOptions: { globals: globals.browser } },
		{
			code: "setTimeout = foo;",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window.setTimeout;",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window.setTimeout = foo;",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window['setTimeout'];",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window['setTimeout'] = foo;",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "global.setTimeout;",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "global.setTimeout = foo;",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "global['setTimeout'];",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "global['setTimeout'] = foo;",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "globalThis['setTimeout'] = foo;",

Review comment (suggestion):
```suggestion
```

`global` is enabled as a global by `sourceType: "commonjs"`.

Code after:
		{ code: "setTimeout;", languageOptions: { globals: globals.browser } },
		{
			code: "setTimeout = foo;",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window.setTimeout;",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window.setTimeout = foo;",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window['setTimeout'];",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window['setTimeout'] = foo;",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "global.setTimeout;",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "global.setTimeout = foo;",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "global['setTimeout'];",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "global['setTimeout'] = foo;",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "globalThis['setTimeout'] = foo;",
			languageOptions: { ecmaVersion: 2020 },
		},

		"window.setTimeout('foo')",
Repository: eslint/eslint
File: tests/lib/rules/no-implied-eval.js (JavaScript)

Code before:
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window.setTimeout = foo;",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window['setTimeout'];",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window['setTimeout'] = foo;",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "global.setTimeout;",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "global.setTimeout = foo;",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "global['setTimeout'];",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "global['setTimeout'] = foo;",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "globalThis['setTimeout'] = foo;",
			languageOptions: { ecmaVersion: 2020, globals: globals.browser },
		},

		"window.setTimeout('foo')",
		"window.setInterval('foo')",
		"window['setTimeout']('foo')",
		"window['setInterval']('foo')",

Review comment (suggestion):
```suggestion
```

Same as the previous comment.

Code after:
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window.setTimeout = foo;",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window['setTimeout'];",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window['setTimeout'] = foo;",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "global.setTimeout;",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "global.setTimeout = foo;",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "global['setTimeout'];",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "global['setTimeout'] = foo;",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "globalThis['setTimeout'] = foo;",
			languageOptions: { ecmaVersion: 2020 },
		},

		"window.setTimeout('foo')",
		"window.setInterval('foo')",
		"window['setTimeout']('foo')",
		"window['setInterval']('foo')",

		{
			code: "window.setTimeout('foo')",
			languageOptions: { sourceType: "commonjs" },
Repository: eslint/eslint
File: tests/lib/rules/no-implied-eval.js (JavaScript)

Code before:
			code: "window['setTimeout'];",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window['setTimeout'] = foo;",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "global.setTimeout;",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "global.setTimeout = foo;",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "global['setTimeout'];",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "global['setTimeout'] = foo;",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "globalThis['setTimeout'] = foo;",
			languageOptions: { ecmaVersion: 2020, globals: globals.browser },
		},

		"window.setTimeout('foo')",
		"window.setInterval('foo')",
		"window['setTimeout']('foo')",
		"window['setInterval']('foo')",

		{
			code: "window.setTimeout('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "window.setInterval('foo')",

Review comment (suggestion):
```suggestion
```

Same as the previous comment.

Code after:
			code: "window['setTimeout'];",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "window['setTimeout'] = foo;",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "global.setTimeout;",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "global.setTimeout = foo;",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "global['setTimeout'];",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "global['setTimeout'] = foo;",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "globalThis['setTimeout'] = foo;",
			languageOptions: { ecmaVersion: 2020 },
		},

		"window.setTimeout('foo')",
		"window.setInterval('foo')",
		"window['setTimeout']('foo')",
		"window['setInterval']('foo')",

		{
			code: "window.setTimeout('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "window.setInterval('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "window['setTimeout']('foo')",
Repository: eslint/eslint
File: tests/lib/rules/no-implied-eval.js (JavaScript)

Code before:
		{
			code: "global.setTimeout;",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "global.setTimeout = foo;",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "global['setTimeout'];",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "global['setTimeout'] = foo;",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "globalThis['setTimeout'] = foo;",
			languageOptions: { ecmaVersion: 2020, globals: globals.browser },
		},

		"window.setTimeout('foo')",
		"window.setInterval('foo')",
		"window['setTimeout']('foo')",
		"window['setInterval']('foo')",

		{
			code: "window.setTimeout('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "window.setInterval('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "window['setTimeout']('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{

Review comment (suggestion):
```suggestion
```

Same as the previous comment.

Code after:
		{
			code: "global.setTimeout;",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "global.setTimeout = foo;",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "global['setTimeout'];",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "global['setTimeout'] = foo;",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "globalThis['setTimeout'] = foo;",
			languageOptions: { ecmaVersion: 2020 },
		},

		"window.setTimeout('foo')",
		"window.setInterval('foo')",
		"window['setTimeout']('foo')",
		"window['setInterval']('foo')",

		{
			code: "window.setTimeout('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "window.setInterval('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "window['setTimeout']('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "window['setInterval']('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
Repository: eslint/eslint
File: tests/lib/rules/no-implied-eval.js (JavaScript)

Code before:
			},
		},
		{
			code: "global.setTimeout = foo;",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "global['setTimeout'];",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "global['setTimeout'] = foo;",
			languageOptions: {
				sourceType: "commonjs",
				globals: globals.browser,
			},
		},
		{
			code: "globalThis['setTimeout'] = foo;",
			languageOptions: { ecmaVersion: 2020, globals: globals.browser },
		},

		"window.setTimeout('foo')",
		"window.setInterval('foo')",
		"window['setTimeout']('foo')",
		"window['setInterval']('foo')",

		{
			code: "window.setTimeout('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "window.setInterval('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "window['setTimeout']('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "window['setInterval']('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "global.setTimeout('foo')",

Review comment (suggestion):
```suggestion
			languageOptions: { ecmaVersion: 2020 },
```

`globalThis` is enabled as a global by `ecmaVersion: 2020`.

Code after:
		},
		{
			code: "global.setTimeout = foo;",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "global['setTimeout'];",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "global['setTimeout'] = foo;",
			languageOptions: {
				sourceType: "commonjs",
			},
		},
		{
			code: "globalThis['setTimeout'] = foo;",
			languageOptions: { ecmaVersion: 2020 },
		},

		"window.setTimeout('foo')",
		"window.setInterval('foo')",
		"window['setTimeout']('foo')",
		"window['setInterval']('foo')",

		{
			code: "window.setTimeout('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "window.setInterval('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "window['setTimeout']('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "window['setInterval']('foo')",
			languageOptions: { sourceType: "commonjs" },
		},
		{
			code: "global.setTimeout('foo')",
			languageOptions: { globals: globals.browser },
		},
		{
			code: "global.setInterval('foo')",