Open xsjcTony opened 8 months ago
To bump up priority (hopefully) I want to add some more details.
This bug is very much visible if you use TypeScript and you need to // ts-ignore
some import (because of missing types for example):
import typescript from "@typescript-eslint/eslint-plugin";
import parserTs from "@typescript-eslint/parser"; // <--- error reported here
// @ts-ignore
import react from "eslint-plugin-react"; // <--- error reported here
// @ts-ignore
import importPlugin from "eslint-plugin-import";
OP example is "just a comment", that can be omitted (not ideal, but possible), with TS you may be forced to have this comment between imports.
This bug exists for 4 years at least (I think it was there since I started using this plugin) and its autofix can trigger import/order
rule errors (if you prohibit new lines between imports).
Something like that:
And my setting is
It reports like this:![image](https://github.com/import-js/eslint-plugin-import/assets/45784210/d89e98a1-1fb9-4565-9c40-196e89f1904b)
But this is not the correct behavior, as in the documentation it clearly says:
after the last top-level import statement
Note: the
exactCount
doesn't matter, as I've tried to remove it but it's still causing issue.Package version: ALL LATEST