linter(import/extensions): improve functionality
This PR brings things more in line with the ESLint plugin's behavior here. However, we can't have full parity since the ESLint plugin relies upon file resolution. Where it did rely on this we try to err towards being permissive to avoid false positives.
This was primarily written with AI, though the code seems reasonable as far as I can tell.
How to use the Graphite Merge Queue
Add either label to this PR to merge it via the merge queue:
- 0-merge - adds this PR to the back of the merge queue
- hotfix - for urgent hot fixes, skip the queue and merge this PR next
You must have a Graphite account in order to use the merge queue. Sign up using this link.
An organization admin has enabled the Graphite Merge Queue in this repository.
Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.
CodSpeed Performance Report
Merging #15009 will not alter performance
Comparing wagenet:better-import-extensions (c8509b7) with main (8c5b958)
Summary
✅ 4 untouched
⏩ 33 skipped[^skipped]
[^skipped]: 33 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.
See also #14602, I'm not sure which is the best to go with as the solution here but I definitely think we need to prioritize fixing this rule.
Also this issue #12220, which I think this PR would solve?