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
feat: add restrictedNamedExportsPattern
to no-restricted-exports
#18431
feat: add restrictedNamedExportsPattern
to no-restricted-exports
#18431
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
Hi @akulsr0, thanks for the PR, but the accepted proposal was to add a new option name |
Hi @Tanujkanti4441, it seems having |
since something like this is already done in no-restricted-imports rule so i think it's fine to have both the options. |
restrictedNamedExports
in `no-restrict…restrictedNamedExportsPattern
to no-restricted-exports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be sure to update the documentation as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just we didn't discuss how this option would correlate with restrictDefaultExports
. For example, when the pattern matches "default"
but some default exports are explicitly allowed by restrictDefaultExports
.
I think the best solution is that this option simply doesn't apply to default
exports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more tests to confirm that this option doesn't apply to default
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! Leaving open for @Tanujkanti4441 to verify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for contributing!
…ed-exports`
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[x] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
Made changes to add support for #18360
Is there anything you'd like reviewers to focus on?
I feel there should be alot more test cases which needs to be added, can add that based on review insights.