import-js / eslint-plugin-import

ESLint plugin with rules that help validate proper imports.
MIT License
5.57k stars 1.57k forks source link

Regression in import/order rule after v2.26 #3034

Closed burt202 closed 3 months ago

burt202 commented 3 months ago

Related to https://github.com/import-js/eslint-plugin-import/issues/2909

Hi, im currently still stuck on v2.26 because a regression made in v2.27 which incorrectly suggests the wrong order for my config. I have cloned the repo and written a test which works in 2.26 but fails in the latest version which may help:

test({
  code: `
  import express from "express"
  import server from "http"

  import logger from "../logger"
  import something from "../utils"
  import {Config, Route, Server} from "./types"
  `,
  options: [
    {
      'newlines-between': 'always',
      groups: [
        ['builtin', 'external'],
        ['parent', 'sibling', 'index'],
      ],
      alphabetize: {
        order: 'asc',
      },
    },
  ],
}),

This has obviously been an issue since Oct 2023 and i know there have been others that have raised similar issues too. I just wondered how to progress.

Cheers!

ljharb commented 3 months ago

I think this is a duplicate of #2722.

Help is appreciated there.