Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(linter): update useImportExtensions to suggest actual extensions #5332

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

arendjr
Copy link
Contributor

@arendjr arendjr commented Mar 11, 2025

Summary

Fixes #5328.

useImportExtensions has been updated to suggest actual file extensions instead of guesses based on hueristics. This is based on the dependency graph.

As part of this, the suggestedExtensions option has been removed. A simpler, new option called forceJsExtensions has been introduced for those who use tsc's "module": "node16" setting.

The rule also no longer reports diagnostics to add an extension when the path doesn't exist at all, with or without extension.

cc @drdaemos

Test Plan

Tests updated.

@arendjr arendjr requested review from a team March 11, 2025 19:58
@github-actions github-actions bot added A-Linter Area: linter A-Parser Area: parser L-JavaScript Language: JavaScript and super languages labels Mar 11, 2025
@arendjr arendjr changed the title feat(linter): update useImportExtensions to repeat actual extensions feat(linter): update useImportExtensions to suggest actual extensions Mar 11, 2025
Copy link

codspeed-hq bot commented Mar 11, 2025

CodSpeed Performance Report

Merging #5332 will not alter performance

Comparing arendjr:update-use-import-extensions (322270d) with main (6de8a32)

Summary

✅ 95 untouched benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter A-Parser Area: parser L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📎 Update useImportExtensions to suggest actual extensions
1 participant