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

Add autofix to selector-pseudo-element-case #3672

Merged

Conversation

boccob
Copy link
Contributor

@boccob boccob commented Sep 15, 2018

Which issue, if any, is this issue related to?

Closes #3662

Is there anything in the PR that needs further explanation?

Example

code:

a:bEfOrE {}

fixed:

a:before {}

@@ -6,6 +6,7 @@ const { messages, ruleName } = rule;
testRule(rule, {
ruleName,
config: ["lower"],
fix: true,
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a test case with comments in the selector?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately it won't work until update to the last version of postcss-selector-parser (#3284).
I don't sure that it makes sense to add some workaround.

Copy link
Member

Choose a reason for hiding this comment

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

In selectorCombinatorSpaceChecker.js, it choose the selector to pass to parseSelector beforehand.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added few new test cases with comments inside selectors.

@boccob boccob requested a review from ota-meshi May 18, 2019 16:47
@boccob
Copy link
Contributor Author

boccob commented May 18, 2019

Hi @evilebottnawi, @ntwb, @hudochenkov,
Can you please check the PR?

Copy link
Member

@hudochenkov hudochenkov left a comment

Choose a reason for hiding this comment

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

LGTM!

@hudochenkov hudochenkov merged commit cb7649b into stylelint:master Sep 7, 2019
@hudochenkov
Copy link
Member

  • Added: selector-pseudo-element-case autofix (#3672).

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.

Add autofix to selector-pseudo-element-case
5 participants