Sage: [Feature] Disable stylelint options by default

Created on 16 Nov 2017  路  2Comments  路  Source: roots/sage

Submit a feature request or bug report


What is the current behavior?

When you import an external css library and it is indented with tabs or does not have the necessary spaces, thousands of errors appear

What is the expected or desired behavior?

No stylelint errors from external libraries appear and the user can decide which feature he needs to activate


Feature Request

Please provide use cases for changing the current behavior:

With this feature the user can activate only the options he needs

Add on package.json

"stylelint": {
    "extends": "stylelint-config-standard",
    "rules": {
      "no-empty-source": null,
      "at-rule-no-unknown": [
        true,
        {
          "ignoreAtRules": [
            "extend",
            "at-root",
            "debug",
            "warn",
            "error",
            "if",
            "else",
            "for",
            "each",
            "while",
            "mixin",
            "include",
            "content",
            "return",
            "function"
          ]
        }
      ],
      "at-rule-blacklist": null,
      "at-rule-empty-line-before": null,
      "at-rule-name-case": null,
      "at-rule-name-newline-after": null,
      "at-rule-name-space-after": null,
      "at-rule-no-unknown": null,
      "at-rule-no-vendor-prefix": null,
      "at-rule-semicolon-newline-after": null,
      "at-rule-semicolon-space-before": null,
      "at-rule-whitelist": null,
      "block-closing-brace-empty-line-before": null,
      "block-closing-brace-newline-after": null,
      "block-closing-brace-newline-before": null,
      "block-closing-brace-space-after": null,
      "block-closing-brace-space-before": null,
      "block-no-empty": null,
      "block-opening-brace-newline-after": null,
      "block-opening-brace-newline-before": null,
      "block-opening-brace-space-after": null,
      "block-opening-brace-space-before": null,
      "color-hex-case": null,
      "color-hex-length": null,
      "color-named": null,
      "color-no-hex": null,
      "color-no-invalid-hex": null,
      "comment-empty-line-before": null,
      "comment-no-empty": null,
      "comment-whitespace-inside": null,
      "comment-word-blacklist": null,
      "custom-media-pattern": null,
      "custom-property-empty-line-before": null,
      "custom-property-pattern": null,
      "declaration-bang-space-after": null,
      "declaration-bang-space-before": null,
      "declaration-block-no-duplicate-properties": null,
      "declaration-block-no-redundant-longhand-properties": null,
      "declaration-block-no-shorthand-property-overrides": null,
      "declaration-block-semicolon-newline-after": null,
      "declaration-block-semicolon-newline-before": null,
      "declaration-block-semicolon-space-after": null,
      "declaration-block-semicolon-space-before": null,
      "declaration-block-single-line-max-declarations": null,
      "declaration-block-trailing-semicolon": null,
      "declaration-colon-newline-after": null,
      "declaration-colon-space-after": null,
      "declaration-colon-space-before": null,
      "declaration-empty-line-before": null,
      "declaration-no-important": null,
      "declaration-property-unit-blacklist": null,
      "declaration-property-unit-whitelist": null,
      "declaration-property-value-blacklist": null,
      "declaration-property-value-whitelist": null,
      "font-family-name-quotes": null,
      "font-family-no-duplicate-names": null,
      "font-weight-notation": null,
      "function-blacklist": null,
      "function-calc-no-unspaced-operator": null,
      "function-comma-newline-after": null,
      "function-comma-newline-before": null,
      "function-comma-space-after": null,
      "function-comma-space-before": null,
      "function-linear-gradient-no-nonstandard-direction": null,
      "function-max-empty-lines": null,
      "function-name-case": null,
      "function-parentheses-newline-inside": null,
      "function-parentheses-space-inside": null,
      "function-url-no-scheme-relative": null,
      "function-url-quotes": null,
      "function-url-scheme-blacklist": null,
      "function-url-scheme-whitelist": null,
      "function-whitelist": null,
      "function-whitespace-after": null,
      "indentation": null,
      "keyframe-declaration-no-important": null,
      "length-zero-no-unit": null,
      "max-empty-lines": null,
      "max-line-length": null,
      "max-nesting-depth": null,
      "media-feature-colon-space-after": null,
      "media-feature-colon-space-before": null,
      "media-feature-name-blacklist": null,
      "media-feature-name-case": null,
      "media-feature-name-no-unknown": null,
      "media-feature-name-no-vendor-prefix": null,
      "media-feature-name-whitelist": null,
      "media-feature-parentheses-space-inside": null,
      "media-feature-range-operator-space-after": null,
      "media-feature-range-operator-space-before": null,
      "media-query-list-comma-newline-after": null,
      "media-query-list-comma-newline-before": null,
      "media-query-list-comma-space-after": null,
      "media-query-list-comma-space-before": null,
      "no-descending-specificity": null,
      "no-duplicate-selectors": null,
      "no-empty-source": null,
      "no-eol-whitespace": null,
      "no-extra-semicolons": null,
      "no-invalid-double-slash-comments": null,
      "no-missing-end-of-source-newline": null,
      "no-unknown-animations": null,
      "number-leading-zero": null,
      "number-max-precision": null,
      "number-no-trailing-zeros": null,
      "property-blacklist": null,
      "property-case": null,
      "property-no-unknown": null,
      "property-no-vendor-prefix": null,
      "property-whitelist": null,
      "rule-empty-line-before": null,
      "selector-attribute-brackets-space-inside": null,
      "selector-attribute-operator-blacklist": null,
      "selector-attribute-operator-space-after": null,
      "selector-attribute-operator-space-before": null,
      "selector-attribute-operator-whitelist": null,
      "selector-attribute-quotes": null,
      "selector-class-pattern": null,
      "selector-combinator-space-after": null,
      "selector-combinator-space-before": null,
      "selector-descendant-combinator-no-non-space": null,
      "selector-id-pattern": null,
      "selector-list-comma-newline-after": null,
      "selector-list-comma-newline-before": null,
      "selector-list-comma-space-after": null,
      "selector-list-comma-space-before": null,
      "selector-max-attribute": null,
      "selector-max-class": null,
      "selector-max-combinators": null,
      "selector-max-compound-selectors": null,
      "selector-max-empty-lines": null,
      "selector-max-id": null,
      "selector-max-specificity": null,
      "selector-max-type": null,
      "selector-max-universal": null,
      "selector-nested-pattern": null,
      "selector-no-qualifying-type": null,
      "selector-no-vendor-prefix": null,
      "selector-pseudo-class-blacklist": null,
      "selector-pseudo-class-case": null,
      "selector-pseudo-class-no-unknown": null,
      "selector-pseudo-class-parentheses-space-inside": null,
      "selector-pseudo-class-whitelist": null,
      "selector-pseudo-element-case": null,
      "selector-pseudo-element-colon-notation": null,
      "selector-pseudo-element-no-unknown": null,
      "selector-type-case": null,
      "selector-type-no-unknown": null,
      "shorthand-property-no-redundant-values": null,
      "string-no-newline": null,
      "string-quotes": null,
      "time-min-milliseconds": null,
      "unit-blacklist": null,
      "unit-case": null,
      "unit-no-unknown": null,
      "unit-whitelist": null,
      "value-keyword-case": null,
      "value-list-comma-newline-after": null,
      "value-list-comma-newline-before": null,
      "value-list-comma-space-after": null,
      "value-list-comma-space-before": null,
      "value-list-max-empty-lines": null,
      "value-no-vendor-prefix": null
    }
  },

Most helpful comment

I have also had issues getting Prettier and Stylelint to work together, specifically in VS Code. Rather than import the stylelint standard and overwrite all the rules, I simply got back to basics in the package.json file:

"stylelint": {
    "rules": {}
  },

All 2 comments

disabling stylelint by default is an option we can add to https://github.com/roots/sage-installer (please open a feature request over there), but stylelint _shouldn't_ be trying to validate any 3rd party libraries you have included.

do you mind opening a thread on https://discourse.roots.io/ with exactly what you modified in your theme? if this is a bug for everyone we definitely want to fix it asap. i've tried reproducing this before without luck. thanks

I have also had issues getting Prettier and Stylelint to work together, specifically in VS Code. Rather than import the stylelint standard and overwrite all the rules, I simply got back to basics in the package.json file:

"stylelint": {
    "rules": {}
  },
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Geczy picture Geczy  路  5Comments

nicooprat picture nicooprat  路  5Comments

ajoah picture ajoah  路  4Comments

oxyc picture oxyc  路  4Comments

emilsgulbis picture emilsgulbis  路  6Comments