import-js/eslint-plugin-import

Groups not being detected properly?

Open

#1,303 建立於 2019年3月19日

在 GitHub 查看
 (4 留言) (2 反應) (0 負責人)JavaScript (1,540 fork)batch import
bughelp wanted

倉庫指標

Star
 (4,946 star)
PR 合併指標
 (平均合併 5天 21小時) (30 天內合併 9 個 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';

貢獻者指南