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

Code before:
                        const exit = await cli.execute(`${options} --no-ignore ${filePath}`, null, useFlatConfig);

                        // no warnings
                        assert.isFalse(log.info.called);
                        assert.strictEqual(exit, 0);
                    });

                    it(`should suppress the warning if --no-warn-ignored is passed with configType:${configType}`, async () => {
                        const options = useFlatConfig
                            ? `--config ${getFixturePath("eslint.config_with_ignores.js")}`
                            : `--ignore-path ${getFixturePath(".eslintignore")}`;
                        const filePath = getFixturePath("passing.js");
                        const exit = await cli.execute(`${options} --no-warn-ignored ${filePath}`, null, useFlatConfig);

                        assert.isFalse(log.info.called);

                        // When eslintrc is used, we get an exit code of 2 because the --no-warn-ignored option is unrecognized.
                        assert.strictEqual(exit, useFlatConfig ? 0 : 2);
                    });

                    it(`should not lint anything when no files are passed if --pass-on-no-patterns is passed with configType:${configType}`, async () => {
                        const exit = await cli.execute("--pass-on-no-patterns", null, useFlatConfig);

                        assert.isFalse(log.info.called);

                        // When eslintrc is used, we get an exit code of 2 because the --no-warn-ignored option is unrecognized.
                        assert.strictEqual(exit, 0);
                    });

                    it(`should suppress the warning if --no-warn-ignored is passed and an ignored file is passed via stdin with configType:${configType}`, async () => {
                        const options = useFlatConfig
                            ? `--config ${getFixturePath("eslint.config_with_ignores.js")}`
                            : `--ignore-path ${getFixturePath(".eslintignore")}`;
                        const filePath = getFixturePath("passing.js");
                        const exit = await cli.execute(`${options} --no-warn-ignored --stdin --stdin-filename ${filePath}`, "foo", useFlatConfig);

                        assert.isFalse(log.info.called);

                        // When eslintrc is used, we get an exit code of 2 because the --no-warn-ignored option is unrecognized.
                        assert.strictEqual(exit, useFlatConfig ? 0 : 2);
                    });
                });

                describe("when given a pattern to ignore", () => {
                    it(`should not process any files with configType:${configType}`, async () => {
                        const ignoredFile = getFixturePath("cli/syntax-error.js");
                        const ignorePathOption = useFlatConfig
                            ? ""
                            : "--ignore-path .eslintignore_empty";
                        const filePath = getFixturePath("cli/passing.js");
                        const ignorePattern = useFlatConfig ? "cli/**" : "cli/";

Review comment (suggestion):
```suggestion
```

I think this comment doesn't apply here,

Code after:

                        // no warnings
                        assert.isFalse(log.info.called);
                        assert.strictEqual(exit, 0);
                    });

                    it(`should suppress the warning if --no-warn-ignored is passed with configType:${configType}`, async () => {
                        const options = useFlatConfig
                            ? `--config ${getFixturePath("eslint.config_with_ignores.js")}`
                            : `--ignore-path ${getFixturePath(".eslintignore")}`;
                        const filePath = getFixturePath("passing.js");
                        const exit = await cli.execute(`${options} --no-warn-ignored ${filePath}`, null, useFlatConfig);

                        assert.isFalse(log.info.called);

                        // When eslintrc is used, we get an exit code of 2 because the --no-warn-ignored option is unrecognized.
                        assert.strictEqual(exit, useFlatConfig ? 0 : 2);
                    });

                    it(`should not lint anything when no files are passed if --pass-on-no-patterns is passed with configType:${configType}`, async () => {
                        const exit = await cli.execute("--pass-on-no-patterns", null, useFlatConfig);

                        assert.isFalse(log.info.called);
                        assert.strictEqual(exit, 0);
                    });

                    it(`should suppress the warning if --no-warn-ignored is passed and an ignored file is passed via stdin with configType:${configType}`, async () => {
                        const options = useFlatConfig
                            ? `--config ${getFixturePath("eslint.config_with_ignores.js")}`
                            : `--ignore-path ${getFixturePath(".eslintignore")}`;
                        const filePath = getFixturePath("passing.js");
                        const exit = await cli.execute(`${options} --no-warn-ignored --stdin --stdin-filename ${filePath}`, "foo", useFlatConfig);

                        assert.isFalse(log.info.called);

                        // When eslintrc is used, we get an exit code of 2 because the --no-warn-ignored option is unrecognized.
                        assert.strictEqual(exit, useFlatConfig ? 0 : 2);
                    });
                });

                describe("when given a pattern to ignore", () => {
                    it(`should not process any files with configType:${configType}`, async () => {
                        const ignoredFile = getFixturePath("cli/syntax-error.js");
                        const ignorePathOption = useFlatConfig
                            ? ""
                            : "--ignore-path .eslintignore_empty";
                        const filePath = getFixturePath("cli/passing.js");
                        const ignorePattern = useFlatConfig ? "cli/**" : "cli/";
                        const exit = await cli.execute(
                            `--ignore-pattern ${ignorePattern} ${ignorePathOption} ${ignoredFile} ${filePath}`, null, useFlatConfig
                        );