-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade stylelint-polaris
to stylelint
v16
#12337
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
73c386f
Upgrade `stylelint` to v16.6.1
aaronccasanova 3a9917f
Drop support for `stylelint` v14 and v15
aaronccasanova 6b8ea1f
Apply changes from `stylelint` v16 migration guide
aaronccasanova e74b256
Upgrade dependencies
aaronccasanova 00af173
Upgrade `@shopify/stylelint-plugin` and add temporary resolution for …
aaronccasanova 1c63b6a
Apply pnpm-lock.yaml updates
aaronccasanova 096d53f
Add changeset entry
aaronccasanova f02b859
Upgrade `@shopify/eslint-plugin` and minimum `eslint` version
aaronccasanova 51db8e4
Apply pnpm-lock.yaml updates
aaronccasanova d516924
Apply `stylelint` patch to await `checkAgainstRule` function calls
aaronccasanova 60c870f
Prettier.format is now async
jesstelford 7ff3993
Update lock file
jesstelford 9adf2f1
prettier ignore some files that shouldn't be formatted
jesstelford 813d555
Fix stylelint failures for at-rule-empty-line-before
jesstelford c4c5a7e
Fix stylelint failures for selector-max-class by increasing limit fro…
jesstelford d036663
Fix stylelint failures for selector-max-combinators by increasing lim…
jesstelford 9edd5a7
Fix stylelint failures for selector-max-specificity by increasing lim…
jesstelford 1da4d17
Disable stylelint rule aration-block-no-redundant-longhand-properties
jesstelford 76561ef
Fix bugs uncovered by the stylelint declaration-property-value-no-unk…
jesstelford bf8c0ba
Fix stylelint failures for rule-empty-line-before
jesstelford f439d74
Fix stylelint failures for selector-max-compound-selectors by increas…
jesstelford 46a3bb1
Fix needless generic stylelint-disable rules
jesstelford b66bfe6
Fix stylelint failure for value-no-vendor-prefix
jesstelford 462c756
Format styles with prettier
jesstelford 64efd5c
fix: jest lint errors
kyledurand dc355ec
Add --experimental-vm-modules flag to polaris-migrator test script
aaronccasanova 06a241d
Update polaris-migrator check util to await prettier.format calls
aaronccasanova 1299dc1
Temporarily remove `styles-insert-stylelint-disable` migration
aaronccasanova c003716
Add changeset
aaronccasanova File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,5 @@ | ||
--- | ||
'@shopify/stylelint-polaris': major | ||
--- | ||
|
||
Dropped support for `stylelint` v14 and v15 |
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,5 @@ | ||
--- | ||
'@shopify/polaris-migrator': major | ||
--- | ||
|
||
Removed `styles-insert-stylelint-disable` migration |
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
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,26 @@ | ||
diff --git a/lib/utils/checkAgainstRule.cjs b/lib/utils/checkAgainstRule.cjs | ||
index 862f0c77f2ec60a26ac670230c531be88cead26f..e2c40a2009941ccd9e6c4a8f49f654c8e6ae1ef3 100644 | ||
--- a/lib/utils/checkAgainstRule.cjs | ||
+++ b/lib/utils/checkAgainstRule.cjs | ||
@@ -45,7 +45,7 @@ async function checkAgainstRule(options, callback) { | ||
const [primary, secondary] = settings; | ||
const ruleFunc = rule(primary, secondary || {}, context); | ||
|
||
- ruleFunc( | ||
+ await ruleFunc( | ||
root, | ||
|
||
// NOTE: This temporary PostCSS result doesn't have a property for Stylelint use. | ||
diff --git a/lib/utils/checkAgainstRule.mjs b/lib/utils/checkAgainstRule.mjs | ||
index c82c6c82734ba7a41f59a57aa7a89f149378599f..168270665e953635e3cb223fe5ebdbbbaf69ff54 100644 | ||
--- a/lib/utils/checkAgainstRule.mjs | ||
+++ b/lib/utils/checkAgainstRule.mjs | ||
@@ -42,7 +42,7 @@ export default async function checkAgainstRule(options, callback) { | ||
const [primary, secondary] = settings; | ||
const ruleFunc = rule(primary, secondary || {}, context); | ||
|
||
- ruleFunc( | ||
+ await ruleFunc( | ||
root, | ||
|
||
// NOTE: This temporary PostCSS result doesn't have a property for Stylelint use. |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm concerned about these changes but I understand the need to ship this PR and how difficult it would be to refactor the css to make these tests pass. @jesstelford did you try just block disabling the rules here? Would that be possible?