hudochenkov / stylelint-order

A plugin pack of order related linting rules for Stylelint.
MIT License
916 stars 61 forks source link

disable @include with a block (order/order)stylelint(order/order) #106

Closed zilahir closed 4 years ago

zilahir commented 4 years ago

How can I disable this rule?

image

hudochenkov commented 4 years ago

Check you configuration, and reconfigure order in a way you like.

zilahir commented 4 years ago

@hudochenkov thanks for your reply!

Yeah, i tried, but can't seem to get the configuration ready. Would you give me a suggestion please?

hudochenkov commented 4 years ago

Show me your config, and tell me order you want for all things.

zilahir commented 4 years ago
{
  "extends": "@zilahir/stylelint-config",
  "ignoreFiles": ["**/*.js", "**/*.jsx"],
  "rules": {
    "order/properties-alphabetical-order": null,
    "selector-class-pattern": "[a-z]+((\\d)|([A-Z0-9][a-z0-9]+))*([A-Z])?",
    "plugin/rational-order": null,
    "selector-max-compound-selectors": 4,
    "order-order": [
      {
        "type": "at-rule",
        "name": "include",
        "hasBlock": "true"
      }
    ]
  }
}

as you can see, in the order/order is the way i was playing with the settings.

The only thing i want is not to get error for the following

.topHeaderContainer {
    @include paragraph {
        font-size: 0;
    }
        @include something;
    background: rgba($color: $header-bg-color, $alpha: 0.7);
    position: fixed;
    height: $hader-height;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: none;
    transition: all 200ms ease-in;
       ...
}
zilahir commented 4 years ago

so basically i the best would be if it would pass both if the include with block are at the top, or at the bottom

hudochenkov commented 4 years ago

Is this what you would like to achieve?

{
  "order/order": [
    {
      "type": "at-rule",
      "name": "include"
    },
    "declarations",
    "rules",
    "at-rules"
  ]
}
zilahir commented 4 years ago

yes, @hudochenkov thank you, i was close, and now i got it understood!

thank you for your help!

hudochenkov commented 4 years ago

You're welcome :)