-
-
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
import/order reports different results on Windows vs Linux #1692
Comments
Is there any chance that git is automatically changing the line-ending characters? What are the exact chars in use in that file on each machine? |
@ljharb Thanks for your reply.. I've checked the line-ending characters format of files and initially, it was CRLF. I tried to changed it to LF for only 1 file and run again eslint on this file, on both Windows and Linux (WSL) and I have the same result on both platform: No eslint errors on Windows, but got 1 error on Linux, for the rule import/order... Tried on both Windows (With Visual Studio Code Powershell console) and Linux (Through WSL) |
I'm seeing the same thing except it wants to sort the local paths first in windows and last in linux. I would expect the linux behavior to be the case in both oses. I tried converting the line endings from LF to CRLF or CR and none of them made a difference |
We had the same problem. It seems to be fixed in master, but not released yet: #1643 I downgraded to 2.19.1 to avoid the issue until the next release is out. |
Ah, ok - fixed by #1643 then. Thanks! |
I found that there are differences between mac and windows10. Will the latest version solve these problems? |
@shx996 it should. if it doesn't, please file a new issue. |
Sorry guys! This hasn't been fixed for macs, importing modules on macs are still inconsistent. Running on mohave. |
Hello there..
When running eslint on my code (on Windows 10 OS), I was at a point where I didn't have any eslint issue. But when I was running eslint on the same code (without any changes) on a "Linux" platform (in my case, it was "Ubuntu 18.04.3 LTS" through WSL), the result was different only for the rule "import/order". I got something like tens of errors, with the SAME code and without any changes
Here is my setup:
Versions:
NodeJS: v12.14.1
Platform: Windows 10 + Ubuntu 18.04.3 LTS on WSL
"eslint": "6.8.0",
"eslint-plugin-header": "3.0.0",
"eslint-plugin-import": "2.20.1",
"@typescript-eslint/eslint-plugin": "2.24.0",
"@typescript-eslint/parser": "2.24.0",
The text was updated successfully, but these errors were encountered: