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

Docs: no-restricted-imports doesn't explain paths vs. patterns #18253

Closed
1 task done
JoshuaKGoldberg opened this issue Apr 1, 2024 · 2 comments · Fixed by #18273
Closed
1 task done

Docs: no-restricted-imports doesn't explain paths vs. patterns #18253

JoshuaKGoldberg opened this issue Apr 1, 2024 · 2 comments · Fixed by #18273
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion documentation Relates to ESLint's documentation

Comments

@JoshuaKGoldberg
Copy link
Contributor

Docs page(s)

https://eslint.org/docs/latest/rules/no-restricted-imports

What documentation issue do you want to solve?

The docs page for no-restricted-imports mentions the paths and patterns objects, but never explicitly says what the difference is or why you'd want to use them. I found this to be confusing. Without poring over the rule's source I don't think it's inferable what the differences between the two are.

What do you think is the correct solution?

Could we clearly explain somewhere under Rule Details or Options...

  • The difference between paths and patterns
  • What the explicit format is for the objects in their arrays

Participation

  • I am willing to submit a pull request for this change.

Additional comments

This issue inspired by talking over the rule with @matthewp. [Discord link]

@JoshuaKGoldberg JoshuaKGoldberg added the documentation Relates to ESLint's documentation label Apr 1, 2024
@nzakas nzakas added the accepted There is consensus among the team that this change meets the criteria for inclusion label Apr 1, 2024
@nzakas
Copy link
Member

nzakas commented Apr 1, 2024

I'd say go for it.

FWIW, you don't need to open issues to suggest docs changes, you can go ahead and submit a PR with the proposed changes to save some time.

@JoshuaKGoldberg
Copy link
Contributor Author

I'm not likely to be able to send this one soon. If anybody else wants to that'd be great too. 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion documentation Relates to ESLint's documentation
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants