question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

import/order 2.20.1

See original GitHub issue

This package works incorrectly on v2.20.1 for import/order rule. Previously I was working on v2.18.x and the rules worked as I expected in accordance with the documentation. After package upgrade I got an error: There should be no empty line within import group import/order

This error happens where it should not. If it’d help, v2.20.0 works fine as expected and only the latest patch version produces this behavior.

.eslintrc.json

    "import/order": [
      2,
      {
        "newlines-between": "always",
        "groups": [
          ["builtin", "external"],
          ["parent", "internal", "sibling", "index", "unknown"]
        ]
      }
    ]

component.jsx

import React from 'react';
import ReactDOM from 'react-dom';

import { App } from './App/App';
import { unregister } from './serviceWorker';
import './index.css';

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
tarsinzercommented, Feb 21, 2020

@ljharb everything is fine now

2reactions
ljharbcommented, Feb 17, 2020

@maktarsis are you on windows?

Either way, can you also try with the latest commit on master for this plugin, and see if your problem is fixed?

Read more comments on GitHub >

github_iconTop Results From Across the Web

import/order 2.20.1 · Issue #1652 - GitHub
This package works incorrectly on v2.20.1 for import/order rule. Previously I was working on v2.18.x and the rules worked as I expected in ......
Read more >
eslint-plugin-import - npm
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import ...
Read more >
ESLint import/order rule works differently on different machines
This looks like it is a bug that occurs in differences between eslint-plugin-import @ 2.20.1 and 2.20.2.
Read more >
eslint-plugin-import - UNPKG
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names. All...
Read more >
@typescript-eslint import order - CodeSandbox
... 2.21.1-alpha.0, 2.21.0, 2.20.1-alpha.7, 2.20.1-alpha.6, 2.20.1-alpha.5, 2.20.1-alpha.4, 2.20.1-alpha.3, 2.20.1-alpha.2, 2.20.1-alpha.1, 2.20.1-alpha.0 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found