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

Apply rule in the order defined in lib/rules/index.js #3923

Merged
merged 2 commits into from Apr 3, 2019
Merged

Conversation

gucong3000
Copy link
Member

@gucong3000 gucong3000 commented Jan 22, 2019

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

Ref #3853

Is there anything in the PR that needs further explanation?

No, it's self explanatory.

@jeddy3
Copy link
Member

jeddy3 commented Jan 22, 2019

Interesting! I'm curious about what effect this has on plugins. What order would the following be executed in?

{
  "plugins": ["stylelint-scss"],
  "rules": {
    "scss/dollar-variable-colon-newline-after": "always",
    "indentation": 2,
  }
}

@gucong3000
Copy link
Member Author

I'm curious about what effect this has on plugins.

Plugin rules will be insert before built-in rules.

@jeddy3
Copy link
Member

jeddy3 commented Feb 5, 2019

This is a tricky one as I believe we're moving control away from some users in favour of making it easier for the majority of them.

Considering that neither approach is ideal, and at some point we're probably going to have to revisit how the autofixing works to properly fix #3853 (and #2643), I think we can merge this as it'll help people using stylelint-config-standard with autofix.

I've changed Closes #3853 to Ref #3853 above as this is more of a workaround than a long term solution.

@jeddy3 jeddy3 mentioned this pull request Feb 18, 2019
6 tasks
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.

Looks good!

@hudochenkov hudochenkov merged commit 35c3f5a into master Apr 3, 2019
@hudochenkov hudochenkov deleted the rule_order branch April 3, 2019 14:39
@hudochenkov
Copy link
Member

Added to changelog:

  • Changed: Apply rules in the order defined in lib/rules/index.js (#3923).

@jeddy3 I'm not sure this wording is good.

@jeddy3
Copy link
Member

jeddy3 commented Apr 3, 2019

@jeddy3 I'm not sure this wording is good.

Sounds ok to me.

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

3 participants