Editorial: Miscellaneous cleanups#834
Merged
anssiko merged 2 commits intowebmachinelearning:mainfrom Apr 9, 2025
inexorabletash:misc-improvements-april2025
Merged
Editorial: Miscellaneous cleanups#834anssiko merged 2 commits intowebmachinelearning:mainfrom inexorabletash:misc-improvements-april2025
anssiko merged 2 commits intowebmachinelearning:mainfrom
inexorabletash:misc-improvements-april2025
Conversation
- Don't explicitly "return undefined" from methods; it's implied. The exception would be methods that conditionally return undefined or another value, but WebNN doesn't have any of those. Added lint rule. - Avoid "not greater than 0"; just "not 0" (if unsigned), or "less than or equal to 0" (if signed). Added lint rule. - "If" must be followed by ", then". Added lint rule. - "Otherwise" must be followed by "," or ":". Added lint rule. - More consistently refer to a list's items instead of values, etc. - Linkfy references to a list's size. - Ensure algorithms don't both throw and reject.
Contributor
Author
|
@huningxin and @fdwr - could you please review? The "not greater than 0" wording change may be controversial; there's an argument to be made in favor of that phrasing, so I'm happy to change. |
fdwr
approved these changes
Apr 7, 2025
Contributor
Author
|
Thanks, editors! Please hit the "squash and merge" button when you can. |
Member
|
@inexorabletash thanks! Happened to be here, so picked up this one. |
github-actions bot
added a commit
that referenced
this pull request
Apr 9, 2025
SHA: 2835868 Reason: push, by anssiko Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Don't explicitly "return undefined" from methods; it's implied. The exception would be methods that conditionally return undefined or another value, but WebNN doesn't have any of those. Added lint rule.
Avoid "not greater than 0"; just "not 0" (if unsigned), or "less than or equal to 0" (if signed). Added lint rule.
"If" must be followed by ", then". Added lint rule.
"Otherwise" must be followed by "," or ":". Added lint rule.
More consistently refer to a list's items instead of values, etc.
Linkfy references to a list's size.
Ensure algorithms don't both throw and reject.
Preview | Diff