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

Code before:
                    parserOptions.ecmaFeatures.globalReturn
                ) {
                    parserOptions.ecmaFeatures.globalReturn = false;
                }
            }
        }

        const settings = config.settings || {};
        const file = new VFile(options.filename, text, {
            physicalPath: providedOptions.physicalFilename
        });

        if (!slots.lastSourceCode) {
            let t;

            if (options.stats) {
                t = startTime();
            }

            const parserService = new ParserService();
            const parseResult = parserService.parseSync(
                file,
                {
                    ...config,
                    languageOptions
                }
            );

            if (options.stats) {
                const time = endTime(t);

                storeTime(time, { type: "parse" }, slots);
            }

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

            slots.lastSourceCode = parseResult.sourceCode;
        } else {

            /*
             * If the given source code object as the first argument does not have scopeManager, analyze the scope.
             * This is for backward compatibility (SourceCode is frozen so it cannot rebind).
             *
             * We check explicitly for `null` to ensure that this is a JS-flavored language.
             * For non-JS languages we don't want to do this.
             *
             * TODO: Remove this check when we stop exporting the `SourceCode` object.
             */
            if (slots.lastSourceCode.scopeManager === null) {

Review comment (suggestion):
```suggestion
                config
```

I believe this can be simplified this way.

Code after:
                    parserOptions.ecmaFeatures.globalReturn
                ) {
                    parserOptions.ecmaFeatures.globalReturn = false;
                }
            }
        }

        const settings = config.settings || {};
        const file = new VFile(options.filename, text, {
            physicalPath: providedOptions.physicalFilename
        });

        if (!slots.lastSourceCode) {
            let t;

            if (options.stats) {
                t = startTime();
            }

            const parserService = new ParserService();
            const parseResult = parserService.parseSync(
                file,
                config
            );

            if (options.stats) {
                const time = endTime(t);

                storeTime(time, { type: "parse" }, slots);
            }

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

            slots.lastSourceCode = parseResult.sourceCode;
        } else {

            /*
             * If the given source code object as the first argument does not have scopeManager, analyze the scope.
             * This is for backward compatibility (SourceCode is frozen so it cannot rebind).
             *
             * We check explicitly for `null` to ensure that this is a JS-flavored language.
             * For non-JS languages we don't want to do this.
             *
             * TODO: Remove this check when we stop exporting the `SourceCode` object.
             */
            if (slots.lastSourceCode.scopeManager === null) {
                slots.lastSourceCode = new SourceCode({
                    text: slots.lastSourceCode.text,
                    ast: slots.lastSourceCode.ast,