bjankord / stylelint-config-sass-guidelines

⚙ A stylelint config inspired by https://sass-guidelin.es/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Removing stylelint-order

binyamin opened this issue · comments

I must say I cannot decide myself. A recent poll on CSS-Tricks determined that over 45% developers order their declarations by type against 14% alphabetically. Also, there are 39% that go full random, including myself.
[...]
Because of this, I will not impose a choice in this styleguide. Pick the one you prefer, as long as you are consistent throughout your stylesheets (i.e. not the random option).
§ Declaration Sorting

The guidelines specifically leave this question undecided. In any case, a user can always install it manually.

If there appears to be enough interest in removing it from this config, I'll look into it. I'll gauge interest based on reactions on this issue.

This would also allow users to update independently instead of waiting for this package to update.

I wish I could use something like this but cannot find out

"extends": [
    "stylelint-config-sass-guidelines",
    "stylelint-config-idiomatic-order"
],

For anyone looking how to do this

.stylelintrc.json

  {
      "extends": [
          "stylelint-config-sass-guidelines",
          "stylelint-config-idiomatic-order"
      ],
      "ignoreFiles": [
          "**/vendor/*.css",
          "**/vendor/**/*.css",
          "**/vendor/*.scss",
          "**/vendor/**/*.scss",
          "**/vendor/*.sass",
          "**/vendor/**/*.sass",
          "**/vendor/*.less",
          "**/vendor/**/*.less"
      ],
      "customSyntax": "postcss-scss",
      "rules": {
          "indentation": 4,
          "string-quotes": "double",
          "selector-max-id": null,
          "color-no-invalid-hex": true,
          "order/properties-alphabetical-order": null
      }
  }

On vscode add stylelint plugin https://github.com/stylelint/vscode-stylelint +

settings.json qdd the following

    "editor.codeActionsOnSave": {
      "source.fixAll.stylelint": true
    },
    "files.autoSaveDelay": 500,

On my laravel mix

.stylelint({
    configFile: ".stylelintrc.json",
    files: ["**/*.scss"],
})

package.json

    "stylelint-config-idiomatic-order": "^8.1.0",
    "stylelint-config-sass-guidelines": "^9.0.1",
    "stylelint-webpack-plugin": "^3.3.0",