-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Implement extensions rule #250
Conversation
|
||
### Exception | ||
|
||
When disallowing the use of certain extensions this rule makes an exception an allows the use of extension when the file would not be resolvable without extension. |
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.
exception an allows
--> exception and allows
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.
Thanks, fixed.
3fa81d2
to
b53639a
Compare
"object-assign": "^4.0.1", | ||
"pkg-up": "^1.0.0" | ||
"object-assign": "^4.0.1" |
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.
object-assign
is duplicated (and linked to that: there seems to be missing a comma after pkg-up
).
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.
Fixed now.
Seems like I did a bad job at resolving the conflicts after rebasing.
7d09b76
to
2fc42a1
Compare
I think you can also add an entry to the changelog (and thank yourself). Also, do you mind adding support for LGTM otherwise, nice job @lo1tuma! |
@jfmengels is there a utility function in what you've added to filter I'm imagining something so CommonJS support is as easy as: return {
ImportDeclaration: checkFileExtension,
CallExpression: filterRequire(checkFileExtension),
} Anyway @lo1tuma if you don't want to worry about CommonJS, I'm cool with that, we can do it post-merge. |
Yeah, I have a function for that, with a use of it here. You can't do something as simple as @benmosher proposed, as the same data (the
👍, I can probably take a look at it if you wish. |
Ah, right. I made a I really need to get that stuff merged back in. CJS vs. ES6 is cross-cutting and common enough that ideally, rules wouldn't need to worry about it explicitly. *note: the JSDoc mistakenly documents the prototype of the visitor as |
I’m not very familiar with AMD so I could only provide an implementation for commonjs. Apart from that, I think it would be better to wait for the |
Sounds good to me |
9cf5d64
to
dcf064a
Compare
This fixes import-js#209 and fixes import-js#204.
I totally forgot about the CHANGELOG. Should be all good now. |
Just merged, thanks! |
This fixes #209 and fixes #204.