Skip to content

Conflict rules: newline-after-import with order #1811

Closed
@Arttse

Description

Maybe a bug, with v2.20.2 works well.

// ESLint: There should be no empty line within import group(import/order)
import { ExecaReturnValue } from 'execa';

import execa = require('execa');

When remove 1 empty line:

// ESLint: Expected 1 empty line after import statement not followed by another import.(import/newline-after-import)
import { ExecaReturnValue } from 'execa';
import execa = require('execa');

Config rules
'import/newline-after-import': ['error'],
'import/order': [
  'error',
  {
    groups: [
      ['builtin', 'external', 'internal'],
      'unknown',
      'parent',
      ['sibling', 'index'],
    ],
    'newlines-between': 'always',
  },
],
OS Linux
node.js 12.18.0
eslint 7.2.0
eslint-plugin-import 2.21.1
@typescript-eslint/parser 3.1.0
typescript 3.9.5

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions