-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Organize Imports doesn't sort '_' as tslint expects it #25114
Comments
A PR would be appreciated. |
I can try my hands on this one, if no one else is working on it! |
It looks like the issue is just using /* ...
*
* Case-insensitive comparisons compare both strings one code-point at a time using the integer
* value of each code-point after applying `toUpperCase` to each string. We always map both
* strings to their upper-case form as some unicode characters do not properly round-trip to
* lowercase (such as `ẞ` (German sharp capital s)).
*/ in |
I would agree that changing the |
I've raised an issue with TSLint palantir/tslint#4063 and submitted a pull request there palantir/tslint#4064, so let's see what they think about fixing this on their end. |
Hi, |
I believe that this is being looked into from |
Ohh, okay. |
Thanks for the reminder. There was a request on my PR, I've addressed that now and updated the PR. (Personally I just forked the TSLint rule but it would be nicer to get this merged into master.) |
Is this taken care of or should someone (maybe I can ? since it looks like it's tagged 'good first issue') take the lead on this ? I'm constantly having this problem on an angular project where the |
I think we decided it would be better to address this on the TSLint end but my PR there is waiting a major release despite having a backwards compatibility flag. I’d try bumping there myself. That said TSLint isn’t getting much love recently so I should get back to my PR on ESLint and address the issues that they had so it can be merged typescript-eslint/typescript-eslint#256 |
Is anybody working on it or else i can work on the issue |
My PR for TSLint palantir/tslint#4064 to change their order to be consistent with Personally I would love it if TypeScript would break imports onto multiple lines in the same way as Prettier does as running |
I think that this issue can be closed now. Tslint (tested on v 6.1.1) now sorts like |
Yep, this is no longer a problem with the latest tslint. |
As TSLint getting deprecated, we are trying to move to eslint-plugin-import's import/order, which has the same issue. I filed an issue on their end (import-js/eslint-plugin-import#1742). |
TypeScript Version: 3.0.0-dev.20180620
vscode Version: 1.24.0 (6a6e02cef0f2122ee1469765b704faf5d0e0d859 2018-06-06T17:37:01.579Z)
OS Version: Ubuntu 16.04 LTS
Search Terms: organise organize imports tslint
Code
Expected behavior: tslint expects the imports to have
_
before alphabetic characters, soOrganize Imports
should sort it toimport { _bar, foo }
Actual behavior: It sorts it to
import { foo, _bar }
, which causes a tslint error.The text was updated successfully, but these errors were encountered: