import-js/eslint-plugin-import

Groups not being detected properly?

Aperta

#1303 aperta il 19 mar 2019

 (4 commenti) (2 reazioni) (0 assegnatari)JavaScript (1549 fork)batch import
bughelp wanted

Metriche repository

Star
 (5938 stelle)
Metriche merge PR
 (Merge medio 138g 22h) (3 PR mergiate in 30 g)

Descrizione

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';

Guida contributor