-
-
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
[New] import/default
: support default export in TSExportAssignment
#1689
Conversation
5 similar comments
@Maxim-Mazurok this seems fine, but is hard to review without tests. Could you add some? |
@ljharb, I've created reproduction repo: https://github.com/Maxim-Mazurok/eslint-plugin-import-1689-reproduction The issue is still present in |
Thanks for confirming. I'd love to review and land this PR; could you modify your repro case to tests in this repo? |
Sure, creating a repro was the first step :) Now I'm going to add tests. |
@ljharb I fixed my code and added tests, please, take a look. |
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.
We have array-includes
for includes already; and i added a try/catch around the JSON.parse just in case, and i rebased it.
See comments, tho.
import/default
: support default export in TSExportAssignment
@ljharb thanks for your comments and fixes. I added fix for |
@Maxim-Mazurok "squash and merge" is not viable - it leaves the PR ref cluttered with the old commits, and orphaned from the master branch. I'm going to force push this one again before landing it; while you can uncheck the "allow edits" box to prevent me from doing that, that has the unfortunate consequence of meaning I'll never merge the PR on any repo I manage, so I hope you won't do that :-) |
Oh, right, I totally forgot that, now it makes sense :) Thanks! |
Thank you for the PR! |
…d anything is exported Fixes import-js#2183. See import-js#1689.
Possible duplicate of #1528 (but uses
tsconfig.json
)Aims to fix #1527
For example, I want to import React as
import React from "react"
. I can do this by usingesModuleInterop: true
intsconfig.json
, but eslint doesn't know about that.This is a draft PR as I'm not really familiar with the codebase. I want to share my approach and receive feedback.