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

Code before:
         *
         * In both cases, we use the cwd as the directory to lint.
         */
        if (patterns === "" || Array.isArray(patterns) && patterns.length === 0) {

            /*
             * Special case: If `passOnNoPatterns` is true, then we just exit
             * without doing any work.
             */
            if (eslintOptions.passOnNoPatterns) {
                return [];
            }

            normalizedPatterns = ["."];
        } else {

            if (!isNonEmptyString(patterns) && !isArrayOfNonEmptyString(patterns)) {
                throw new Error("'patterns' must be a non-empty string or an array of non-empty strings");
            }

            if (typeof patterns === "string") {
                normalizedPatterns = [patterns];
            }
        }

        debug(`Using file patterns: ${patterns}`);

        const configs = await calculateConfigArray(this, eslintOptions);
        const {
            allowInlineConfig,
            cache,
            cwd,
            fix,
            fixTypes,
            reportUnusedDisableDirectives,
            globInputPaths,
            errorOnUnmatchedPattern,
            warnIgnored
        } = eslintOptions;
        const startTime = Date.now();
        const fixTypesSet = fixTypes ? new Set(fixTypes) : null;

        // Delete cache file; should this be done here?
        if (!cache && cacheFilePath) {
            debug(`Deleting cache file at ${cacheFilePath}`);

            try {
                await fs.unlink(cacheFilePath);
            } catch (error) {
                const errorCode = error && error.code;


Review comment (bug):
```suggestion
        debug(`Using file patterns: ${normalizedPatterns}`);
```

Since this is after the calculations, I'm guessing you meant to log `normalizedPatterns`?

Code after:
            options: eslintOptions
        } = privateMembers.get(this);

        /*
         * Special cases:
         * 1. `patterns` is an empty string
         * 2. `patterns` is an empty array
         *
         * In both cases, we use the cwd as the directory to lint.
         */
        if (patterns === "" || Array.isArray(patterns) && patterns.length === 0) {

            /*
             * Special case: If `passOnNoPatterns` is true, then we just exit
             * without doing any work.
             */
            if (eslintOptions.passOnNoPatterns) {
                return [];
            }

            normalizedPatterns = ["."];
        } else {

            if (!isNonEmptyString(patterns) && !isArrayOfNonEmptyString(patterns)) {
                throw new Error("'patterns' must be a non-empty string or an array of non-empty strings");
            }

            if (typeof patterns === "string") {
                normalizedPatterns = [patterns];
            }
        }

        debug(`Using file patterns: ${normalizedPatterns}`);

        const configs = await calculateConfigArray(this, eslintOptions);
        const {
            allowInlineConfig,
            cache,
            cwd,
            fix,
            fixTypes,
            globInputPaths,
            errorOnUnmatchedPattern,
            warnIgnored
        } = eslintOptions;
        const startTime = Date.now();
        const fixTypesSet = fixTypes ? new Set(fixTypes) : null;

        // Delete cache file; should this be done here?
        if (!cache && cacheFilePath) {
            debug(`Deleting cache file at ${cacheFilePath}`);