-
-
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
order
/newline-after-import
: Add support for TypeScript's "export import"
#1830
order
/newline-after-import
: Add support for TypeScript's "export import"
#1830
Conversation
…ort object" Co-authored-by: be5invis <belleve@typeof.net> Co-authored-by: Manuel Thalmann <m@nuth.ch>
354e6f0
to
9844da9
Compare
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!
587f61f
to
dda23cc
Compare
order
/newline-after-import
: Add unit tests for TypeScript's "export import"
@ljharb Hah, these tests reveal a bug in |
lol, thanks :-) we can just turn this PR into the fix for it. |
Add @manuth @ljharb I may not able to create a fix because I cannot get
|
@be5invis for getting this repo to work on a windows machine I recommend you to use "Windows Subsystem for Linux" aka. WSL (VSCode provides extensions for developing projects inside WSL. If you don't want to use WSL, you can upgrade the nyc dependency:
After this, tests should work fine on windows. |
@be5invis do I understand correctly, that your goal is, that |
@manuth |
Recent changes in #1823 cause them to not be ignored by |
Shall we discuss |
@manuth Ah I understand what you mean... |
Exactly... it's not just this, sadly... // Modules
import fs = require("fs");
// or
export import fs = require("fs");
import { ESLint } from "eslint";
// Object-literals
import LintResult = ESLint.LintResult;
// or
export import LintResult = ESLint.LintResult; Problems About ExportsAs you have brought up in issue #1829, Problems About Object-LiteralsMy last changes in mentioned PR caused object-imports to be forced to be alphabetized as well. import A = ESLint;
import LintResult = A.LintResult; // Reports an error because "ESLint" > "A.LintResult" I don't really know what to do about it... either we could set the Also there's more to be done about |
@manuth Agree. We could file other work items for further support of these. |
Alright! What about fixing object-imports and |
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.
I've added some comments here and there where there are some changes to be applied.
order
/newline-after-import
: Add unit tests for TypeScript's "export import"order
/newline-after-import
: Add support for TypeScript's "export import"
781937c
to
2962628
Compare
This PR adds support for TypeScript's "export import", typically used to re-export things.
In current
eslint-plugin-import
they are treated as imports rather than exports.Related: #1829.
cc. @ljharb