dwjohnston
dwjohnston

Reputation: 11870

ESLint import/order rule works differently on different machines - error `..` import should occur before import of `.`

I have an issue where there are some imports

import foo from "."; 
import bar from ".."; 

The problem I'm having is that on my machine this will give me the error;

error  `..` import should occur before import of `.`  import/order

Whereas, on my friend's machine this will look fine, and swapping them around will give the same error but reversed.

If we run ./node_modules/.bin/eslint -v both show as 4.19.1.

What could likely be going on here to cause eslint to behave differently? Something around whitespace or line endings?

Upvotes: 8

Views: 12141

Answers (1)

dwjohnston
dwjohnston

Reputation: 11870

This looks like it is a bug that occurs in differences between eslint-plugin-import @ 2.20.1 and 2.20.2.

See: https://github.com/benmosher/eslint-plugin-import/issues/1760

Upvotes: 4

Related Questions