-
-
Notifications
You must be signed in to change notification settings - Fork 929
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
Remove import-lazy
and change stylelint.rules
Promise-based
#7279
Conversation
This commit makes the following changes, including a breaking: - Remove the `import-lazy` dependency - Make the `stylelint.rules` object Promise-based (breaking) Thanks to these changes, the test suite is executed for ESM rules (`lib/rules/*/index.mjs`), instead of CJS ones (`*.cjs`).
🦋 Changeset detectedLatest commit: 5d45c61 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
||
```diff js | ||
-const rule = stylelint.rules['block-no-empty']; | ||
+const rule = await stylelint.rules['block-no-empty']; |
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.
question
This looks like a breaking change.
Do we know if there are popular downstream packages that will be impacted?
While searching on GitHub, I found some developer guides and one deprecated plugin that were affected.
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.
Right, this is a breaking change. But I believe there should be no big impact.
And I realized the developer guide also needs to be updated, so I'll do that with this PR.
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.
Based on these results, we ought to inform, beforehand, the maintainers of these popular projects :
- openstyles/stylus
- stylelint/vscode-stylelint
- SonarSource/SonarJS
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.
Do you think the migration guide will be insufficient? I think that idea is not limited since we lack our resources.
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.
@tophf, @ota-meshi, @saberduck
I thought that you might want to be informed in advance of that breaking change so you will be able to schedule a version shortly after the release of version 16.
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.
@tophf, @ota-meshi, @saberduck
You can test the next
release.
see #6930 (comment)
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.
LGTM, thank you.
Thanks for the review. We can now proceed with #7280. |
In addition, this change does the following: - improve the migration guide for v16 - rewrite the writing plugin guide for ESM - make the changelog items more consistent Note: I realized that #7279 produced a breaking change in `stylelint.utils.checkAgainstRule`.
In addition, this change does the following: - improve the migration guide for v16 - rewrite the writing plugin guide for ESM - make the changelog items more consistent Note: I realized that #7279 produced a breaking change in `stylelint.utils.checkAgainstRule`.
In addition, this change does the following: - improve the migration guide for v16 - rewrite the writing plugin guide for ESM - make the changelog items more consistent Note: I realized that #7279 produced a breaking change in `stylelint.utils.checkAgainstRule`. Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Ref #5291
This commit makes the following changes, including a breaking:
import-lazy
dependencystylelint.rules
object Promise-based (breaking)Thanks to these changes, the test suite is executed for ESM rules (
lib/rules/*/index.mjs
), instead of CJS ones (*.cjs
).