-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stylelint-polaris] Fix custom property allowed list plugin (#7877)
### WHY are these changes introduced? The `polaris/custom-property-allowed-list` plugin is currently reporting a single problem for what should be two different problems that can potentially exist in the same decl (`--p-test: var(--p-unknown);`): - one problem for definition of custom property name with disallowed prefix - `--p-test: var(--p-space-1);` - one problem for definition of custom property value with invalid Polaris token or private Polaris component token - `color: var(--p-unknown);` <!-- Context about the problem that’s being addressed. --> ### WHAT is this pull request doing? This PR: - Removes remnants of internal vs external configs - Reports problems with specific error messages for each of the two rule configuration options - Clarifies the intentions and configuration of the rule - Fixes the metadata URLs of custom rules ### 🎩 checklist - [x] Tested in VS Code (https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide - [x] Tested in terminal
- Loading branch information
Showing
6 changed files
with
113 additions
and
160 deletions.
There are no files selected for viewing
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 @@ | ||
--- | ||
'@shopify/stylelint-polaris': patch | ||
--- | ||
|
||
- Updated the `polaris/custom-property-allowed-list` plugin tests for unified config | ||
- Updated `polaris/custom-property-allowed-list` to report problems with tailored messages for each of the two configuration options | ||
- Fixed metadata URLs for `polaris/*` plugins |
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
Oops, something went wrong.