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

Code before:
        const processorService = new ProcessorService();
        const preprocessResult = processorService.preprocessSync(file, {
            processor: {
                preprocess,
                postprocess
            }
        });

        if (!preprocessResult.ok) {
            return preprocessResult.errors;
        }

        const filterCodeBlock =
            options.filterCodeBlock ||
            (blockFilePath => blockFilePath.endsWith(".js"));
        const originalExtname = path.extname(filename);

        const { files } = preprocessResult;

        const messageLists = files.map(block => {
            debug("A code block was found: %o", block.path ?? "(unnamed)");

            // Keep the legacy behavior.
            if (typeof block === "string") {
                return this._verifyWithoutProcessors(block, config, options);
            }

            // Skip this block if filtered.
            if (!filterCodeBlock(block.path, block.body)) {
                debug("This code block was skipped.");
                return [];
            }

            // Resolve configuration again if the file content or extension was changed.
            if (configForRecursive && (text !== block.body || path.extname(block.path) !== originalExtname)) {
                debug("Resolving configuration again because the file content or extension was changed.");
                return this._verifyWithConfigArray(
                    block.body,
                    configForRecursive,
                    { ...options, filename: block.path, physicalFilename: block.physicalPath }
                );
            }

            slots.lastSourceCode = null;

            // Does lint.
            return this.#eslintrcVerifyWithoutProcessors(
                block,
                config,
                { ...options, filename: block.path, physicalFilename: block.physicalPath }
            );

Review comment (bug):
```suggestion
            debug("A code block was found: %o", block.path);
```

Same as https://github.com/eslint/eslint/pull/18818#discussion_r1764787354, though I think it would be better to move both into `ProcessorService#preprocessSync()`.

Code after:
        });

        const preprocess = options.preprocess || (rawText => [rawText]);
        const postprocess = options.postprocess || (messagesList => messagesList.flat());

        const processorService = new ProcessorService();
        const preprocessResult = processorService.preprocessSync(file, {
            processor: {
                preprocess,
                postprocess
            }
        });

        if (!preprocessResult.ok) {
            return preprocessResult.errors;
        }

        const filterCodeBlock =
            options.filterCodeBlock ||
            (blockFilePath => blockFilePath.endsWith(".js"));
        const originalExtname = path.extname(filename);

        const { files } = preprocessResult;

        const messageLists = files.map(block => {
            debug("A code block was found: %o", block.path ?? "(unnamed)");

            // Keep the legacy behavior.
            if (typeof block === "string") {
                return this._verifyWithoutProcessors(block, config, options);
            }

            // Skip this block if filtered.
            if (!filterCodeBlock(block.path, block.body)) {
                debug("This code block was skipped.");
                return [];
            }

            // Resolve configuration again if the file content or extension was changed.
            if (configForRecursive && (text !== block.rawBody || path.extname(block.path) !== originalExtname)) {
                debug("Resolving configuration again because the file content or extension was changed.");
                return this._verifyWithConfigArray(
                    block.rawBody,
                    configForRecursive,
                    { ...options, filename: block.path, physicalFilename: block.physicalPath }
                );
            }

            slots.lastSourceCode = null;

            // Does lint.