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

Code before:
                    ignorePatterns: "",
                    overrideConfig: "",
                    overrideConfigFile: "",
                    plugins: "",
                    reportUnusedDisableDirectives: "",
                    warnIgnored: ""
                }),
                new RegExp(escapeStringRegExp([
                    "Invalid Options:",
                    "- 'allowInlineConfig' must be a boolean.",
                    "- 'baseConfig' must be an object or null.",
                    "- 'cache' must be a boolean.",
                    "- 'cacheLocation' must be a non-empty string.",
                    "- 'cwd' must be an absolute path.",
                    "- 'errorOnUnmatchedPattern' must be a boolean.",
                    "- 'fix' must be a boolean or a function.",
                    "- 'fixTypes' must be an array of any of \"directive\", \"problem\", \"suggestion\", and \"layout\".",
                    "- 'globInputPaths' must be a boolean.",
                    "- 'ignore' must be a boolean.",
                    "- 'ignorePatterns' must be an array of non-empty strings or null.",
                    "- 'overrideConfig' must be an object or null.",
                    "- 'overrideConfigFile' must be a non-empty string, null, or true.",
                    "- 'plugins' must be an object or null.",
                    "- 'reportUnusedDisableDirectives' must be any of \"error\", \"warn\", \"off\", and null."

                    // "- 'warnIgnored' must be a boolean."
                ].join("\n")), "u")
            );
        });

        it("should throw readable messages if 'ignorePatterns' is not an array of non-empty strings.", () => {
            const invalidIgnorePatterns = [
                () => {},
                false,
                {},
                "",
                "foo",
                [[]],
                [() => {}],
                [false],
                [{}],
                [""],
                ["foo", ""],
                ["foo", "", "bar"],
                ["foo", false, "bar"]
            ];

            invalidIgnorePatterns.forEach(ignorePatterns => {
                assert.throws(
                    () => new FlatESLint({ ignorePatterns }),
                    new RegExp(escapeStringRegExp([

Review comment (suggestion):
```suggestion
                    "- 'reportUnusedDisableDirectives' must be any of \"error\", \"warn\", \"off\", and null.",
                    "- 'warnIgnored' must be a boolean."
```

Code after:
                    ignorePatterns: "",
                    overrideConfig: "",
                    overrideConfigFile: "",
                    plugins: "",
                    reportUnusedDisableDirectives: "",
                    warnIgnored: ""
                }),
                new RegExp(escapeStringRegExp([
                    "Invalid Options:",
                    "- 'allowInlineConfig' must be a boolean.",
                    "- 'baseConfig' must be an object or null.",
                    "- 'cache' must be a boolean.",
                    "- 'cacheLocation' must be a non-empty string.",
                    "- 'cwd' must be an absolute path.",
                    "- 'errorOnUnmatchedPattern' must be a boolean.",
                    "- 'fix' must be a boolean or a function.",
                    "- 'fixTypes' must be an array of any of \"directive\", \"problem\", \"suggestion\", and \"layout\".",
                    "- 'globInputPaths' must be a boolean.",
                    "- 'ignore' must be a boolean.",
                    "- 'ignorePatterns' must be an array of non-empty strings or null.",
                    "- 'overrideConfig' must be an object or null.",
                    "- 'overrideConfigFile' must be a non-empty string, null, or true.",
                    "- 'plugins' must be an object or null.",
                    "- 'reportUnusedDisableDirectives' must be any of \"error\", \"warn\", \"off\", and null.",
                    "- 'warnIgnored' must be a boolean."
                ].join("\n")), "u")
            );
        });

        it("should throw readable messages if 'ignorePatterns' is not an array of non-empty strings.", () => {
            const invalidIgnorePatterns = [
                () => {},
                false,
                {},
                "",
                "foo",
                [[]],
                [() => {}],
                [false],
                [{}],
                [""],
                ["foo", ""],
                ["foo", "", "bar"],
                ["foo", false, "bar"]
            ];

            invalidIgnorePatterns.forEach(ignorePatterns => {
                assert.throws(
                    () => new FlatESLint({ ignorePatterns }),
                    new RegExp(escapeStringRegExp([
                        "Invalid Options:",