ESLint import/order 规则在不同机器上的工作方式不同 - 错误 `..` import should occur before import of `.`

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

我有一些导入的问题

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

我遇到的问题是在我的机器上这会给我错误;

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

然而,在我朋友的机器上这看起来不错,交换它们会给出相同的错误但相反。

如果我们运行./node_modules/.bin/eslint -v都显示为4.19.1。

这里可能发生了什么导致 eslint 表现不同?空格或行尾周围的东西?

这看起来像是 eslint-plugin-import @ 2.20.1 和 2.20.2 之间的差异中出现的错误。

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