import-js/eslint-plugin-import

Groups not being detected properly?

Open

#1 303 ouverte le 19 mars 2019

Voir sur GitHub
 (4 commentaires) (2 réactions) (0 assignés)JavaScript (1 540 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (4 946 stars)
Métriques de merge PR
 (Merge moyen 5j 21h) (9 PRs mergées en 30 j)

Description

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

Guide contributeur