fix(file-extension-in-import): handle directory index imports#499
Merged
aladdin-add merged 1 commit intoeslint-community:masterfrom Jan 13, 2026
Conversation
44b9635 to
ad75460
Compare
ad75460 to
1d67d2d
Compare
aladdin-add
approved these changes
Jan 10, 2026
aladdin-add
left a comment
There was a problem hiding this comment.
LGTM, a big thanks! Leaving open for two more days to give others chance to review before merging.
Author
|
just FYI when we land this PR and #506 the https://github.com/open-telemetry/opentelemetry-js repo can use |
scagood
approved these changes
Jan 12, 2026
scagood
left a comment
There was a problem hiding this comment.
Are we sure we want to add a fixer for /index here?
That feels like a little out of scope for file-extension-in-import -- That being said I am happy with this
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #403
Summary
index.*extensions for directory imports so file-extension-in-import knows what to requireindex(plus a slash when needed) and add fixtures/tests covering both./dirand./dir/Testing
npm run test:mocha tests/lib/rules/file-extension-in-import.jsruns throughNotes