Skip to content

Unexpected import-x/sort issue in >=3.8 #351

Closed
@iCrawl

Description

@iCrawl

Somewhere starting from 3.7.0 there seems to be some kind of bug introduced or at least a breaking change in behavior reading custom tsconfig paths.

v3.7.0...master

Previous result:

Image

No errors.

After 3.8:

Image Image

No change in userland code at all.

This obviously leads to errors where the visual editor, whether that be cursor, visual studio code or whatever wants to move those lines. But when I then try to commit and run the CLI it will complain because they shouldn't be moved around. This didn't happen in 3.7

The tsconfig paths are relatively simple as well:

...
		"paths": {
			"@/*": ["./src/*"]
		}
	},
	"include": [
		"src/**/*.ts",
		"src/**/*.tsx",
		"src/**/*.js",
		"src/**/*.jsx",
		"src/**/*.cjs",
		"src/**/*.mjs",
		"next-env.d.ts",
		".next/types/**/*.ts"
	],
...

Temporary fix for me: Downgrade and pin to 3.7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions