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

Improving ignore pattern documentation and UX for Windows users #8139

Closed
platinumazure opened this issue Feb 23, 2017 · 4 comments
Closed

Improving ignore pattern documentation and UX for Windows users #8139

platinumazure opened this issue Feb 23, 2017 · 4 comments
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion core Relates to ESLint's core APIs and features documentation Relates to ESLint's documentation help wanted The team would welcome a contribution from the community for this issue

Comments

@platinumazure
Copy link
Member

Inspired by #8135. Root cause of that issue was that the user was using a Windows path (with backslash delimiters) as an ignore pattern (which require forward slash delimiters).

Currently we use node-ignore to provide support for gitignore style patterns. Should we consider expanding that to support Windows paths (basically replacing \ with / before feeding the patterns to node-ignore)? Or would that add too much confusion?

Observations about current documentation (as of 2/23/2017):

  • CLI docs for --ignore-pattern do use the term "patterns" rather than "paths", but no direct mention of gitignore syntax. It does mention that it's the same format as .eslintignore, but no cross-linking. I think that would be an easy fix.
  • Configuring docs mention node-ignore and use "pattern" terminology throughout. I wouldn't mind a link to node-ignore occurring sooner but otherwise this is probably good.

Any other documentation we should update?

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Feb 23, 2017
@platinumazure platinumazure changed the title Should we support Windows-style ignore pattern delimiters in .eslintignore and --ignore-path? Improving ignore pattern documentation and UX for Windows users Feb 23, 2017
@platinumazure platinumazure added core Relates to ESLint's core APIs and features evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Feb 23, 2017
@not-an-aardvark not-an-aardvark added the documentation Relates to ESLint's documentation label Nov 3, 2017
@borela
Copy link

borela commented Jun 7, 2018

No need to convert the slashes as most windows users(who are using git) are already used to it. But I believe that the documentation should state clearly that --ignore-pattern uses the .gitignore syntax.

@platinumazure platinumazure added accepted There is consensus among the team that this change meets the criteria for inclusion and removed evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Jun 7, 2018
@platinumazure
Copy link
Member Author

Thanks @borela for your feedback.

I think we can turn this into a documentation-only issue, and we can discuss any core code changes elsewhere. So I've marked the issue "accepted" and added "help wanted" label as well. Thanks!

@platinumazure platinumazure added the help wanted The team would welcome a contribution from the community for this issue label Jun 7, 2018
@santanaG
Copy link
Contributor

Hi! @platinumazure what are the changes you are suggesting exactly? Is this still relevant?

@platinumazure
Copy link
Member Author

Hi @santanaG, thanks for commenting.

The general idea is this: In our .eslintignore documentation, we want to make it clear that the syntax is the same as .gitignore (and, in particular, that all paths should use forward slash as the path separator).

As far as I know, this is still relevant.

Hope this helps!

santanaG added a commit to santanaG/eslint that referenced this issue Aug 20, 2018
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch gitignore-syntax-updates
# Changes to be committed:
#modified:   docs/user-guide/command-line-interface.md
#modified:   docs/user-guide/configuring.md
#

Adds cross links between .eslintignore and --ignore-pattern sections.
Adds link to --ignore-pattern section directing to .gitignore specs.
Adds description to .eslintignore section that emphasizes forward slashes being necessary with examples of valid and invalid syntax.
Adds explicit statements to both sections that support this example.
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 19, 2019
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion core Relates to ESLint's core APIs and features documentation Relates to ESLint's documentation help wanted The team would welcome a contribution from the community for this issue
Projects
None yet
Development

No branches or pull requests

5 participants