hudochenkov / stylelint-order

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

Stylelint don't lint anymore after adding style-order in plugins #54

Closed Manours closed 7 years ago

Manours commented 7 years ago

Hi there,

I'm trying to configure my .stylelintrc with stylelint-order but when I add stylelint-order to plugins, stylelint no longer detect any problems.

I'm using stylelint 8.2.0 and stylelint-order 0.7.0.

Any clue ?

stylelint-order

hudochenkov commented 7 years ago

Can you share your config?

Manours commented 7 years ago

.stylelintrc

{
  "extends": "stylelint-config-standard",
  "plugins": [
    "stylelint-order"
  ],
  "rules": {
    "indentation": null,
    "string-quotes": "double",
    "no-duplicate-selectors": true,
    "color-hex-case": "lower",
    "color-hex-length": "short",
    "color-named": "never",
    "selector-max-id": 0,
    "selector-combinator-space-after": "always",
    "selector-attribute-quotes": "always",
    "selector-attribute-operator-space-before": "never",
    "selector-attribute-operator-space-after": "never",
    "selector-attribute-brackets-space-inside": "never",
    "declaration-block-trailing-semicolon": "always",
    "declaration-no-important": true,
    "declaration-colon-space-before": "never",
    "declaration-colon-space-after": "always",
    "block-closing-brace-newline-after": null,
    "block-no-empty": null,
    "value-no-vendor-prefix": true,
    "number-leading-zero": "never",
    "function-url-quotes": "always",
    "font-weight-notation": "numeric",
    "font-family-name-quotes": "always-unless-keyword",
    "comment-whitespace-inside": "always",
    "comment-empty-line-before": "always",
    "at-rule-no-unknown": null,
    "at-rule-no-vendor-prefix": true,
    "rule-empty-line-before": "always",
    "selector-pseudo-element-colon-notation": "double",
    "selector-pseudo-class-parentheses-space-inside": "never",
    "media-feature-range-operator-space-before": "always",
    "media-feature-range-operator-space-after": "always",
    "media-feature-name-no-vendor-prefix": true,
    "media-feature-colon-space-before": "always",
    "media-feature-colon-space-after": "always",

    "order/order": [
      "custom-properties",
      "dollar-variables",
      "at-variables",
      "declarations",
      "rules",
      "at-rules"
    ],
    "order/properties-order": [
      {
        "properties": ["content", "quotes"]
      },
      {
        "emptyLineBefore": "always",
        "properties": ["flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", "align-content", "align-items", "align-self", "justify-content", "order"]
      },
      {
        "emptyLineBefore": "always",
        "properties": ["position", "top", "right", "bottom", "left", "z-index"]
      },
      {
        "emptyLineBefore": "always",
        "properties": ["display", "width", "min-width", "max-width", "height", "min-height", "max-height", "visibility", "box-sizing", "overflow", "overflow-x", "overflow-y"]
      },
      {
        "emptyLineBefore": "always",
        "properties": ["margin", "margin-top", "margin-right", "margin-bottom", "margin-left", "padding", "padding-top", "padding-right", "padding-bottom", "padding-left"]
      },
      {
        "emptyLineBefore": "always",
        "properties": ["float","clear"]
      },
      {
        "emptyLineBefore": "always",
        "properties": ["border",
          "border-top", "border-right", "border-bottom", "border-left", "border-width", "border-top-width", "border-right-width", "border-bottom-width", "border-left-width", "border-style", "border-top-style", "border-right-style", "border-bottom-style", "border-left-style", "border-radius", "border-top-left-radius", "border-top-right-radius", "border-bottom-left-radius", "border-bottom-right-radius", "border-color", "border-top-color", "border-right-color", "border-bottom-color", "border-left-color", "border-spacing", "border-collapse"]
      },
      {
        "emptyLineBefore": "always",
        "properties": ["background",
          "background-color", "background-image", "background-repeat", "background-position", "background-size", "box-shadow", "fill"]
      },
      {
        "emptyLineBefore": "always",
        "properties": ["color", "font", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-effect", "font-style", "font-variant", "font-weight", "font-emphasize", "font-emphasize-position", "font-emphasize-style", "letter-spacing", "line-height", "list-style", "text-align", "text-align-last", "text-decoration", "text-indent", "text-justify", "text-overflow", "text-overflow-ellipsis", "text-overflow-mode", "text-rendering", "text-outline", "text-shadow", "text-transform", "text-wrap", "word-wrap", "word-break", "text-emphasis", "text-emphasis-color", "text-emphasis-style", "text-emphasis-position", "vertical-align", "white-space", "word-spacing", "hyphens", "src"]
      },
      {
        "emptyLineBefore": "always",
        "properties": ["clip", "zoom", "columns", "column-gap", "column-fill", "column-rule", "column-span", "column-count", "column-width", "table-layout", "empty-cells", "caption-side", "list-style", "list-style-position", "list-style-type", "list-style-image", "transform", "transform-origin", "transform-style", "backface-visibility", "perspective", "perspective-origin", "outline", "outline-color", "outline-offset", "outline-style", "outline-width", "stroke-width", "stroke-linecap", "stroke-dasharray", "stroke-dashoffset", "stroke", "opacity", "tab-size", "counter-reset", "counter-increment", "resize", "cursor", "pointer-events", "speak", "user-select", "nav-index", "nav-up", "nav-right", "nav-down", "nav-left"]
      },
      {
        "emptyLineBefore": "always",
        "properties": ["transition", "transition-property", "transition-duration", "transition-timing-function", "transition-delay"]
      },
      {
        "emptyLineBefore": "always",
        "properties": ["animation", "animation-name", "animation-duration", "animation-play-state", "animation-timing-function", "animation-delay", "animation-iteration-count", "animation-direction"]
      }
    ]
  }
}

package.json

{
  "scripts": {
    "build": "webpack --env production --progress --hide-modules",
    "dev": "webpack-dev-server --port 3001"
  },
  "dependencies": {
    "lodash": "^4.17.4"
  },
  "devDependencies": {
    "autoprefixer": "^7.1.4",
    "babel-core": "^6.26.0",
    "babel-loader": "^7.1.2",
    "babel-plugin-syntax-dynamic-import": "^6.18.0",
    "babel-preset-env": "^1.6.0",
    "clean-webpack-plugin": "^0.1.17",
    "css-loader": "^0.28.7",
    "extract-text-webpack-plugin": "^3.0.1",
    "file-loader": "^1.1.5",
    "html-webpack-plugin": "^2.30.1",
    "node-sass": "^4.5.3",
    "postcss-loader": "^2.0.6",
    "sass-em": "^1.0.2",
    "sass-loader": "^6.0.6",
    "sass-mq": "^3.3.2",
    "sass-rem": "^1.2.3",
    "sass-resolution": "^1.0.0",
    "style-loader": "^0.19.0",
    "stylelint": "^8.2.0",
    "stylelint-config-standard": "^17.0.0",
    "stylelint-order": "^0.7.0",
    "stylus": "^0.54.5",
    "stylus-loader": "^3.0.1",
    "svg4everybody": "^2.1.4",
    "url-loader": "^0.6.2",
    "webpack": "^3.5.6",
    "webpack-dev-server": "^2.9.1",
    "webpack-manifest-plugin": "^1.3.2",
    "webpack-merge": "^4.1.0"
  }
}
hudochenkov commented 7 years ago

I can't reproduce your problem using stylelint CLI. Can you create a repository with minimal reproducible example?

Could you verify that you use locally installed stylelint and not globally installed? Could you try to reinstall node modules?

Looks like your editor is running something else, then what expected.

Manours commented 7 years ago

I add stylelint in my webpack stack and it works. It seems to be a problem with VSCode and Atom.

Thanks for your help !