Repository navigation
fix(lint): preserve quoted foreign import paths - #1422
Merged
Lorenzobattistela merged 2 commits intoOct 8, 2026
Merged
Lorenzobattistela merged 2 commits into
Lorenzobattistela merged 2 commits into
Conversation
Lorenzobattistela
approved these changes
Oct 8, 2026
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.
bend-lint refuses whole-file formatting when a quoted foreign import filename contains
#or whitespace-boundedas. The import formatter treats those bytes as a comment or module alias, and the safety guard correctly rejects the changed path.Use existing comment-token offsets to locate trailing comments and preserve literal paths during alias normalization. Add regressions for hashes, spaces, raw backslashes, trailing comments and LF/CRLF, plus a module path and alias named
as. The tests stay in bend-lint's own suite, following the maintainer guidance in #1389.Validation:
--fixruns preserve both affected filenames under LF/CRLF, produce a clean second lint run, and preserve program output before/after formatting and in emitted JavaScript.git diff --checkpasses.Typecheck still reports the same two pre-existing TS2339 errors as clean main, in
bend2/bend.tsat lines 2040 and 3771. There are no new diagnostics.