[8.x] Resolve false positives with eslint no color rule (#204848) #204906
+32
−15
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.
Backport
This will backport the following commits from
main
to8.x
:Questions ?
Please refer to the Backport tool documentation
","sha":"7cbd9b0c1d19358470ad4c8a36dcc0a02b46f532","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","backport:prev-minor"],"title":"Resolve false positives with eslint no color rule ","number":204848,"url":"https://github.com//pull/204848","mergeCommit":{"message":"Resolve false positives with eslint no color rule (#204848)\n\n## Summary\r\n\r\nFixes error in lint rule that resulted in false positives, also added a\r\ntest case to ascertain the issue has been fixed. For context the error\r\nhappens in instances where specific CSS declarations that are\r\nderivatives of shorthand declarations that can apply color to the HTML\r\nelement or text nodes where found, because the check we had simply\r\nchecked if we got a string back instead of asserting that it was a falsy\r\nvalue.\r\n\r\n## Before\r\n![Screenshot 2024-12-17 at 10 27\r\n18 PM](https://github.com/user-attachments/assets/b0918d37-22f6-4778-a6d0-2cafe11b18e1)\r\n\r\n![Screenshot 2024-12-17 at 8 03\r\n33 PM](https://github.com/user-attachments/assets/d70c733d-e88f-42d6-956a-e266d53724f9)\r\n\r\n## After\r\n\r\n\r\n\r\n\r\n
\r\n\r\n","sha":"7cbd9b0c1d19358470ad4c8a36dcc0a02b46f532"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com//pull/204848","number":204848,"mergeCommit":{"message":"Resolve false positives with eslint no color rule (#204848)\n\n## Summary\r\n\r\nFixes error in lint rule that resulted in false positives, also added a\r\ntest case to ascertain the issue has been fixed. For context the error\r\nhappens in instances where specific CSS declarations that are\r\nderivatives of shorthand declarations that can apply color to the HTML\r\nelement or text nodes where found, because the check we had simply\r\nchecked if we got a string back instead of asserting that it was a falsy\r\nvalue.\r\n\r\n## Before\r\n![Screenshot 2024-12-17 at 10 27\r\n18 PM](https://github.com/user-attachments/assets/b0918d37-22f6-4778-a6d0-2cafe11b18e1)\r\n\r\n![Screenshot 2024-12-17 at 8 03\r\n33 PM](https://github.com/user-attachments/assets/d70c733d-e88f-42d6-956a-e266d53724f9)\r\n\r\n## After\r\n\r\n
\r\n\r\n\r\n
\r\n\r\n","sha":"7cbd9b0c1d19358470ad4c8a36dcc0a02b46f532"}}]}] BACKPORT-->