Repository: eslint/eslint
File: lib/eslint/eslint.js (JavaScript)

Code before:
            });
        }

        // Check for the .eslintignore file, and warn if it's present.
        if (existsSync(path.resolve(processedOptions.cwd, ".eslintignore"))) {
            process.emitWarning(
                "The \".eslintignore\" file is no longer supported. Switch to using the \"ignores\" property in \"eslint.config.js\": https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files",
                "ESLintIgnoreWarning"
            );
        }
    }

    /**
     * The version text.
     * @type {string}
     */
    static get version() {
        return version;
    }

    /**
     * The default configuration that ESLint uses internally.
     * @type {ConfigArray}
     */
    static get defaultConfig() {
        return Object.freeze(defaultConfig);
    }

    /**
     * Outputs fixes from the given results to files.
     * @param {LintResult[]} results The lint results.
     * @returns {Promise<void>} Returns a promise that is used to track side effects.
     */
    static async outputFixes(results) {
        if (!Array.isArray(results)) {
            throw new Error("'results' must be an array");
        }

        await Promise.all(
            results
                .filter(result => {
                    if (typeof result !== "object" || result === null) {
                        throw new Error("'results' must include only objects");
                    }
                    return (
                        typeof result.output === "string" &&
                        path.isAbsolute(result.filePath)
                    );
                })
                .map(r => fs.writeFile(r.filePath, r.output))
        );

Review comment (suggestion):
If we are going to freeze the default config, I think it's better to do that right away in the module where it is created rather than as a side effect of accessing it through this property. That way, we could see earlier if freezing the object breaks something.

Code after:
            });
        }

        // Check for the .eslintignore file, and warn if it's present.
        if (existsSync(path.resolve(processedOptions.cwd, ".eslintignore"))) {
            process.emitWarning(
                "The \".eslintignore\" file is no longer supported. Switch to using the \"ignores\" property in \"eslint.config.js\": https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files",
                "ESLintIgnoreWarning"
            );
        }
    }

    /**
     * The version text.
     * @type {string}
     */
    static get version() {
        return version;
    }

    /**
     * The default configuration that ESLint uses internally. This is provided for tooling that wants to calculate configurations using the same defaults as ESLint.
     * Keep in mind that the default configuration may change from version to version, so you shouldn't rely on any particular keys or values to be present.
     * @type {ConfigArray}
     */
    static get defaultConfig() {
        return defaultConfig;
    }

    /**
     * Outputs fixes from the given results to files.
     * @param {LintResult[]} results The lint results.
     * @returns {Promise<void>} Returns a promise that is used to track side effects.
     */
    static async outputFixes(results) {
        if (!Array.isArray(results)) {
            throw new Error("'results' must be an array");
        }

        await Promise.all(
            results
                .filter(result => {
                    if (typeof result !== "object" || result === null) {
                        throw new Error("'results' must include only objects");
                    }
                    return (
                        typeof result.output === "string" &&
                        path.isAbsolute(result.filePath)
                    );
                })
                .map(r => fs.writeFile(r.filePath, r.output))