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

Support resolving and caching without "resolver" settings #7

Closed
zepumph opened this issue Aug 31, 2021 · 2 comments
Closed

Support resolving and caching without "resolver" settings #7

zepumph opened this issue Aug 31, 2021 · 2 comments

Comments

@zepumph
Copy link

zepumph commented Aug 31, 2021

Hello! I work for PhET Interactive simulations and we use eslint for code quality. I found this repo over in import-js/eslint-plugin-import#325 (comment), as we have the same goals for import filename validation. Specifics about our context are tracked over in phetsims/chipper#1079.

We want to use the rule: default-import-match-filename, but were finding this error in any file that had a failure for this rule:

 1:1  error  Resolve error: unable to load resolver "node"                       consistent-default-export-name/default-import-match-filename

In general the rule was working great, I just want to silence this error.

I poked through the common code, and found the error boils down to an assumption about common settings coming form the context.

https://github.com/minseoksuh/eslint-plugin-consistent-default-export-name/blob/main/lib/common/resolve.js#L144-L146

I plan to submit a pull request for a fix that works for our project. Let me know what you think!

Best,
Michael

P.S. pardon the horrible name for this issue, I did the best I could to understand the context of the code I fixed, but really I was just trying to gracefully support our case for the rule.

@zepumph
Copy link
Author

zepumph commented Aug 31, 2021

Pull request created in #8, let me know what you think!

Thanks again for making this package so that I didn't have to repeat work to accomplish this rule for our project.

@zepumph
Copy link
Author

zepumph commented Sep 1, 2021

#8 (comment) was very helpful. I'll pick things up there. Closing

@zepumph zepumph closed this as completed Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant