import-js/eslint-plugin-import

Groups not being detected properly?

开放

#1,303 创建于 2019年3月19日

 (4 条评论) (2 个反应) (0 位负责人)JavaScript (1,549 个派生)batch import
bughelp wanted

仓库指标

星标
 (5,938 个星标)
PR 合并指标
 (平均合并 138天 22小时) (30 天内合并 3 个 PR)

描述

Am I misunderstanding something, or is this a bug? The newline is exactly in the right place.

"rules": {
  "import/order": [
    "warn",
    {
      "groups": ["builtin", "external", "parent", "sibling", "index"],
      "newlines-between": "always"
    }
  ],
import React from 'react';
import { hot } from 'react-hot-loader';
import { BrowserRouter, Route, Switch } from 'react-router-dom';   // <--- warning  There should be no empty line within import group  import/order

import { Footer } from 'components/Footer';
import { Header } from 'components/Header';
import { Login } from 'components/Login';

贡献者指南