-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
import/named for module.exports
?
#1145
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
Comments
It should, i'd expect. |
I'd definitely love that, as we haven't migrated backend code to ES6 imports yet. Looks like it doesn't work right now. Tried with this setting:
|
Should a case like this be ignored? if(foo === bar) {
module.exports.foo = bar;
} I assume we should only check the top-level And also stranger cases like this: Object.assign(module.exports, {
foo: 'bar'
}); |
I’m not worried about the stranger cases. Code that does that should be refactored to use a single static module.exports assignment. |
Any idea when this will get merged in? |
Sorry, I was referring to the open PR (#1222). |
ahhh, i didn't remember there was one :-) I've got it on my list to rereview. |
Actually #1226 (commonjs exports) is the relevant one for this issue. |
Is there anything I can help with this feature? I want to put this rule in place on my projects and in my option this feature suits really well |
@fabioelizandro if you comment a link to an updated branch on #1226, then I can pull in the changes and we can get it moving. |
Hey, is there any way to enable the
import/named
rule formodule.exports
?Eg:
The text was updated successfully, but these errors were encountered: