Skip to content
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

fix: use processSync #567

Merged
merged 2 commits into from
Dec 8, 2021
Merged

fix: use processSync #567

merged 2 commits into from
Dec 8, 2021

Conversation

xboy2012
Copy link
Contributor

in the Stylelint source code, it use processSync.

process() returns a Promise but it's not handled properly.

@xboy2012
Copy link
Contributor Author

anyone come to review this?

@@ -2,7 +2,7 @@ import postCssSelectorParser from "postcss-selector-parser";

export default function(selector, result, node, cb) {
try {
postCssSelectorParser(cb).process(selector);
postCssSelectorParser(cb).processSync(selector);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could make this fully match the code from stylelint and make add a return: return postCssSelectorParser(cb).processSync(selector)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @xboy2012

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for late response.

I was working on an old version of stylelint, in which I see no return in the source code.

I read the latest code of stylelint again. I see the return there. My PR is Updated.

Copy link
Contributor Author

@xboy2012 xboy2012 Dec 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For convenience, I post the source code url here

https://github.com/stylelint/stylelint/blob/main/lib/utils/parseSelector.js

@kristerkari kristerkari merged commit 18153a4 into stylelint-scss:master Dec 8, 2021
@xboy2012 xboy2012 deleted the patch-1 branch December 8, 2021 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants