Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multiple --ignore-path flags #6345

Merged
merged 10 commits into from Sep 14, 2022

Conversation

kimulaco
Copy link
Member

Which issue, if any, is this issue related to?

Closes #4680

Is there anything in the PR that needs further explanation?

No, it's self-explanatory.
Please let me know if I'm missing a unit test.

@changeset-bot
Copy link

changeset-bot bot commented Sep 12, 2022

🦋 Changeset detected

Latest commit: e181e37

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
stylelint Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kimulaco Thanks for creating the pull request. I've left a comment about backward compatibility, so please confirm it.

types/stylelint/index.d.ts Outdated Show resolved Hide resolved
@jeddy3 jeddy3 changed the title Allow multiple --ignore-path flag Add support for multiple --ignore-path flags Sep 13, 2022
Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Almost good. 👍🏼

I've left one more refactoring suggestion, so can you see it?

lib/utils/getFileIgnorer.js Outdated Show resolved Hide resolved
@ybiquitous
Copy link
Member

We may need to update the CLI help and the following documents about the --ignore-path option.
Any thoughts, @jeddy3 ?

stylelint/lib/cli.js

Lines 125 to 129 in bb10282

--ignore-path, -i
Path to a file containing patterns that describe files to ignore. The
path can be absolute or relative to process.cwd(). By default, stylelint
looks for .stylelintignore in process.cwd().

### `--ignore-path, -i`
A path to a file containing patterns describing files to ignore. The path can be absolute or relative to `process.cwd()`. By default, Stylelint looks for `.stylelintignore` in `process.cwd()`. [More info](options.md#ignorePath).

## `ignorePath`
CLI flags: `--ignore-path, -i`
A path to a file containing patterns describing files to ignore. The path can be absolute or relative to `process.cwd()`. By default, Stylelint looks for `.stylelintignore` in `process.cwd()`.

@jeddy3
Copy link
Member

jeddy3 commented Sep 13, 2022

Any thoughts, @jeddy3 ?

ESLint does a good job of this. Let's add "You can repeat the option to provide multiple paths" to those three descriptions, e.g.

"Path to a file containing patterns that describe files to ignore. The path can be absolute or relative to process.cwd(). You can repeat the option to provide multiple paths. By default, Stylelint looks for .stylelintignore in process.cwd(). "

@kimulaco
Copy link
Member Author

@jeddy3 @ybiquitous Thanks. I have updated the document. 268f2af dc3db68

Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeddy3 Thanks, your suggestion is so good. 👍🏼

@kimulaco Thank you for updating the code and docs. LGTM 👍🏼

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@jeddy3 jeddy3 merged commit b598c18 into stylelint:main Sep 14, 2022
@kimulaco kimulaco deleted the feat/issue-4680 branch September 21, 2022 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Allow multiple files in the --ignore-path flag
3 participants