Skip to content

Don't allow use of the nullish coalescing operator in templates#2025

Merged
mollykreis merged 5 commits intomainfrom
correct-volatile-template-bindings
Apr 19, 2024
Merged

Don't allow use of the nullish coalescing operator in templates#2025
mollykreis merged 5 commits intomainfrom
correct-volatile-template-bindings

Conversation

@mollykreis
Copy link
Contributor

Pull Request

🤨 Rationale

Resolves #1843

I did an evaluation of how observables work within FAST templates. A longer explanation of what is and is not allowed can be found in the discussion within the linked issue. The only issue I found within nimble code was the usage of ?? in templates, which may not correctly be identified as a volatile binding. Therefore, I've rewritten the bindings that previously used ?? and added a lint rule for template.ts files that disallows usage of ??.

👩‍💻 Implementation

See Rationale

🧪 Testing

All existing tests still pass
Verified that the new lint rule catches instances of ?? in template.ts files

✅ Checklist

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

@mollykreis mollykreis changed the title Correct volatile template bindings Don't allow use of the nullish coalescing operator in templates Apr 19, 2024
@mollykreis mollykreis marked this pull request as ready for review April 19, 2024 13:37
@mollykreis mollykreis enabled auto-merge (squash) April 19, 2024 16:21
@mollykreis mollykreis merged commit e3e5231 into main Apr 19, 2024
@mollykreis mollykreis deleted the correct-volatile-template-bindings branch April 19, 2024 16:39
m-akinc added a commit that referenced this pull request Feb 4, 2026
…allowing ?? in templates (#2851)

# Pull Request

## 🤨 Rationale

See #2025 for background.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Evaluate volatile template bindings

3 participants