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

Removing stylelint-order #214

Closed
binyamin opened this issue Dec 26, 2021 · 4 comments · Fixed by #278
Closed

Removing stylelint-order #214

binyamin opened this issue Dec 26, 2021 · 4 comments · Fixed by #278

Comments

@binyamin
Copy link

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.

@bjankord
Copy link
Owner

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.

@gfellerph
Copy link

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

@Kwaadpepper
Copy link

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

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

@Kwaadpepper
Copy link

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",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants