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 declaration-colon-space-before #3445

Merged
merged 4 commits into from
Jul 15, 2018
Merged

Add autofix to declaration-colon-space-before #3445

merged 4 commits into from
Jul 15, 2018

Conversation

ota-meshi
Copy link
Member

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

declaration-colon-space-before in #2829

Is there anything in the PR that needs further explanation?

ex.

  • option: always

    code:

    a { color: pink; }

    fixed:

    a { color : pink; }
  • option: never

    code:

    a { color : pink; }

    fixed:

    a { color: pink; }

fix: context.fix
? decl => {
if (expectation === "always") {
decl.raws.between = decl.raws.between.replace(/^\s*:/, " :");
Copy link
Member

Choose a reason for hiding this comment

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

What about if i have comment display/*comment*/:/*comment*/block;? Please add test

@ota-meshi
Copy link
Member Author

@evilebottnawi Thank you for review!
I changed it, so please check it.

@jeddy3 jeddy3 changed the title Add autofix to declaration-colon-space-before Add autofix to declaration-colon-space-before Jul 10, 2018
Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

@ota-meshi Thanks, LGTM!

@ntwb ntwb dismissed alexander-akait’s stale review July 15, 2018 00:45

Requested changes have been fixed

@ntwb ntwb merged commit d336ddc into stylelint:master Jul 15, 2018
@ntwb
Copy link
Member

ntwb commented Jul 15, 2018

Changelog updated in: 3455c64

Added: declaration-colon-space-before autofix (#3445).

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.

None yet

4 participants