-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't allow use of the nullish coalescing operator in templates (#2025)
# 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](#1843 (comment)). 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 <!--- Review the list and put an x in the boxes that apply or ~~strike through~~ around items that don't (along with an explanation). --> - [ ] I have updated the project documentation to reflect my changes or determined no changes are needed.
- Loading branch information
1 parent
89ce7be
commit e3e5231
Showing
5 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@ni-nimble-components-0911f623-6d16-4c80-9b6d-0757470b2ca7.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Don't allow use of the nullish coalescing operator in templates", | ||
"packageName": "@ni/nimble-components", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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