ESLint import-x/order config doesn't match documented import organization · Issue #9225 · nodejs/nodejs.org · GitHub
Skip to content

ESLint import-x/order config doesn't match documented import organization #9225

Open

Description

@alexicum

Enter your suggestions in details:

The import ordering documented in docs/code-style.md#import-organization doesn't match ESLint import-x/order rules.

Import Organization

Organize imports in this order:

  1. Node.js built-in modules
  2. External library imports (Including @node-core/*)
  3. Relative imports (./*, ../*, #specifier/)
  4. Type-only imports at the end of each given section

Actual ESLint config:

groups: [
  'builtin',
  'external',
  'internal',
  'object',
  'type',            // <-- all type imports in one block
  ['sibling', 'parent'],
  'index',
],

Leads to:

Proposal: Update docs to match ESLint config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions