executeOnFiles(patterns) {
		const {
			cacheFilePath,
			fileEnumerator,
			lastConfigArrays,
			lintResultCache,
			linter,
			options: {
				allowInlineConfig,
				cache,
				cwd,
				fix,
				reportUnusedDisableDirectives,
			},
		} = internalSlotsMap.get(this);
		const results = [];
		const startTime = Date.now();

		// Clear the last used config arrays.
		lastConfigArrays.length = 0;

		// Delete cache file; should this do here?
		if (!cache) {
			try {
				fs.unlinkSync(cacheFilePath);
			} catch (error) {
				const errorCode = error && error.code;

				// Ignore errors when no such file exists or file system is read only (and cache file does not exist)
				if (
					errorCode !== "ENOENT" &&
					!(errorCode === "EROFS" && !fs.existsSync(cacheFilePath))
				) {
					throw error;
				}
			}
		}

		// Iterate source code files.
		for (const { config, filePath, ignored } of fileEnumerator.iterateFiles(
			patterns,
		)) {
			if (ignored) {
				results.push(createIgnoreResult(filePath, cwd));
				continue;
			}

			/*
			 * Store used configs for:
			 * - this method uses to collect used deprecated rules.
			 * - `getRules()` method uses to collect all loaded rules.
			 * - `--fix-type` option uses to get the loaded rule's meta data.
			 */
			if (!lastConfigArrays.includes(config)) {
				lastConfigArrays.push(config);
			}

			// Skip if there is cached result.
			if (lintResultCache) {
				const cachedResult = lintResultCache.getCachedLintResults(
					filePath,
					config,
				);

				if (cachedResult) {
					const hadMessages =
						cachedResult.messages &&
						cachedResult.messages.length > 0;

					if (hadMessages && fix) {
						debug(
							`Reprocessing cached file to allow autofix: ${filePath}`,
						);
					} else {
						debug(
							`Skipping file since it hasn't changed: ${filePath}`,
						);
						results.push(cachedResult);
						continue;
					}
				}
			}

			// Do lint.
			const result = verifyText({
				text: fs.readFileSync(filePath, "utf8"),
				filePath,
				config,
				cwd,
				fix,
				allowInlineConfig,
				reportUnusedDisableDirectives,
				fileEnumerator,
				linter,
			});

			results.push(result);

			/*
			 * Store the lint result in the LintResultCache.
			 * NOTE: The LintResultCache will remove the file source and any
			 * other properties that are difficult to serialize, and will
			 * hydrate those properties back in on future lint runs.
			 */
			if (lintResultCache) {
				lintResultCache.setCachedLintResults(filePath, config, result);
			}
		}

		// Persist the cache to disk.
		if (lintResultCache) {
			lintResultCache.reconcile();
		}

		debug(`Linting complete in: ${Date.now() - startTime}ms`);
		let usedDeprecatedRules;

		return {
			results,
			...calculateStatsPerRun(results),

			// Initialize it lazily because CLI and `ESLint` API don't use it.
			get usedDeprecatedRules() {
				if (!usedDeprecatedRules) {
					usedDeprecatedRules = Array.from(
						iterateRuleDeprecationWarnings(lastConfigArrays),
					);
				}
				return usedDeprecatedRules;
			},
		};
	}
/*.{${extensions.join(",")}}`;

		return patterns.filter(Boolean).map(pathname => {
			const resolvedPath = path.resolve(options.cwd, pathname);
			const newPath = directoryExists(resolvedPath)
				? pathname.replace(/[/\\]$/u, "") + dirSuffix
				: pathname;

			return path.normalize(newPath).replace(/\\/gu, "/");
		});
	}

	/**
Executes the current configuration on an array of file and directory names.
@param {string[]} patterns An array of file and directory names.
@throws {Error} As may be thrown by `fs.unlinkSync`.
@returns {LintReport} The results for all files that were linted.