Repository navigation
Support template literals and constants in token-format - #162
Merged
Darshan808 merged 3 commits intoOct 28, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes reuse established utilities and include regression coverage, with no blocking issues identified; tests were not executed.
No open issues 🎉
What changed in this PR
Extends token-format beyond raw string literals using existing static-string and type-resolution utilities, addressing #161.
Changes:
- Validates resolvable templates, constants, and string-literal-typed expressions.
- Adds static and type-aware test cases.
- Documents the expanded support.
| File | Description |
|---|---|
| website/docs/rules/token-format.md | Documents supported token ID expressions. |
| tests/jupyter-token-format.test.ts | Adds template, constant, and type-aware coverage. |
| src/rules/token-format.ts | Uses shared resolution utilities and skips spread arguments. |
Review effort: Balanced
Yash990-bit
marked this pull request as draft
October 19, 2026 19:26
Darshan808
requested changes
Oct 24, 2026
Darshan808
left a comment
Member
There was a problem hiding this comment.
I see this is in draft, but gave few feedbacks.
Yash990-bit
marked this pull request as ready for review
October 24, 2026 10:44
Contributor
Author
|
Hi @Darshan808 when you get a chance, could you please take a look at this PR? |
Darshan808
requested changes
Oct 28, 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.
Summary
Previously,
token-formatonly checked raw string literals passed as the first argument tonew Token(...). Token IDs declared via template literals, constants, or type-aware identifiers were skipped.This PR updates
token-formatto useresolveStaticStringandgetTypeServices:new Token(`${PKG}:ISymbol`)andnew Token(`${PKG}:kebab-case`))Resolve #161