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

Code before:
    {
        name: "eslint/lib",
        files: ["lib/*"],
        ignores: ["lib/unsupported-api.js"],
        rules: {
            "n/no-restricted-require": ["error", [
                ...createInternalFilesPatterns()
            ]]
        }
    },
    {
        name: "eslint/cli-engine",
        files: [INTERNAL_FILES.CLI_ENGINE_PATTERN],
        rules: {
            "n/no-restricted-require": ["error", [
                ...createInternalFilesPatterns(INTERNAL_FILES.CLI_ENGINE_PATTERN)
            ]]
        }
    },
    {
        name: "eslint/linter",
        files: [INTERNAL_FILES.LINTER_PATTERN],
        rules: {
            "n/no-restricted-require": ["error", [
                ...createInternalFilesPatterns(INTERNAL_FILES.LINTER_PATTERN),
                "fs",
                resolveAbsolutePath("lib/cli-engine/index.js"),
                resolveAbsolutePath("lib/rule-tester/index.js")
            ]]
        }
    },
    {
        name: "eslint/rules",
        files: [INTERNAL_FILES.RULES_PATTERN],
        rules: {
            "n/no-restricted-require": ["error", [
                ...createInternalFilesPatterns(INTERNAL_FILES.RULES_PATTERN),
                "fs",
                resolveAbsolutePath("lib/cli-engine/index.js"),
                resolveAbsolutePath("lib/linter/index.js"),
                resolveAbsolutePath("lib/rule-tester/index.js"),
                resolveAbsolutePath("lib/source-code/index.js")
            ]]
        }
    },
    {
        name: "eslint/shared",
        files: ["lib/shared/**/*"],
        rules: {
            "n/no-restricted-require": ["error", [
                ...createInternalFilesPatterns(),

Review comment (suggestion):
In the future we could consider putting this into 'eslint-config-eslint' so that it can be easily used in other repositories of the eslint organization.

Code after:
    },
    {
        name: "eslint/tests",
        files: ["tests/**/*.js"],
        languageOptions: {
            globals: {
                ...globals.mocha
            }
        },
        rules: {
            "no-restricted-syntax": ["error", {
                selector: "CallExpression[callee.object.name='assert'][callee.property.name='doesNotThrow']",
                message: "`assert.doesNotThrow()` should be replaced with a comment next to the code."
            }]
        }
    },

    // JSON files
    {
        name: "eslint/json",
        files: ["**/*.json", ".c8rc"],
        ignores: ["**/package-lock.json"],
        language: "json/json",
        ...json.configs.recommended
    },

    // JSONC files
    {
        name: "eslint/jsonc",
        files: ["knip.jsonc"],
        language: "json/jsonc",
        ...json.configs.recommended
    },

    // Restrict relative path imports
    {
        name: "eslint/lib",
        files: ["lib/*.js"],
        ignores: ["lib/unsupported-api.js"],
        rules: {
            "n/no-restricted-require": ["error", [
                ...createInternalFilesPatterns()
            ]]
        }
    },
    {
        name: "eslint/cli-engine",
        files: [INTERNAL_FILES.CLI_ENGINE_PATTERN],
        rules: {
            "n/no-restricted-require": ["error", [
                ...createInternalFilesPatterns(INTERNAL_PATHS.CLI_ENGINE_PATTERN)