ThisIsManta / stylus-supremacy

A Node.js script that helps formatting Stylus files.
https://thisismanta.github.io/stylus-supremacy
MIT License
88 stars 9 forks source link

how to exclude stylus-supremacy [vs-code] to autofix files #23

Closed D4NH closed 6 years ago

D4NH commented 6 years ago

Using .stylintrc with the following exclude property doesn't ignore the autofix when saving the file.

{ "exclude": ["vendor/assets/style/variables/**/*"] }

Is there any other way to ignore autofix files when open and saving them? Also using the built-in editor.formatOnSave setting, maybe it's not possible?

ThisIsManta commented 6 years ago

May I see your whole stylintrc file?

D4NH commented 6 years ago
{
  "brackets": "never",
  "colons": "always",
  "commaSpace": "always",
  "commentSpace": "always",
  "duplicates": "true",
  "efficient": "always",
  "exclude": ["vendor/assets/style/variables/**/*"],
  "indentPref": "4",
  "leadingZero": "always",
  "namingConvention": "lowercase-dash",
  "noImportant": false,
  "reporter": "stylint-stylish",
  "semicolons": "never",
  "sortOrder": "alphabetical",
  "zeroUnits": "always"
}
ThisIsManta commented 6 years ago

What if a user manually run Format Document on the file that is in ignored pattern?

ThisIsManta commented 6 years ago

Hmm, I guess it's all or nothing. I cannot make the ignored (exclude) files get manually formatted in VSCode.

ThisIsManta commented 6 years ago

Starting from Stylus Supremacy v2.9.0, it recognizes exclude in stylintrc file or ignoreFiles formatting option. See also https://thisismanta.github.io/stylus-supremacy/#option-ignore-files

Cheers!

D4NH commented 6 years ago

This is great. Thanks!