myagkikh_evgeniy
@myagkikh_evgeniy

Почему в stylelintrs.json не подхватывается правило overrides?

Всем привет!

Почему линтер не подхватывает правила, описанные в поле overrides?
Линтер видит только то, что описано в глобе

{
  "plugins": [
    "stylelint-config-rational-order/plugin",
    "stylelint-no-unsupported-browser-features",
    "stylelint-order",
    "stylelint-scss"
  ],
  "defaultSeverity": "error",
  "rules": {
    "at-rule-name-case": "lower",
    "at-rule-no-unknown": [true, {
      "ignoreAtRules": [
        "define-mixin",
        "mixin-content",
        "mixin",
        "extend",
        "for",
        "if",
        "else",
        "define-extend",
        "include"
      ]
    }],
    "alpha-value-notation": "number",
    "at-rule-no-vendor-prefix": [true, {"severity": "warning"}],
    "at-rule-semicolon-newline-after": "always",
    "block-no-empty": true,
    "block-closing-brace-empty-line-before": "never",
    "block-opening-brace-newline-after": "always",
    "block-closing-brace-newline-after": ["always-single-line", {
      "ignoreAtRules": [
        "if",
        "else"
      ]
    }],
    "block-closing-brace-newline-before": "always-multi-line",
    "block-opening-brace-space-before": "always",
    "block-opening-brace-space-after": "always-single-line",
    "block-closing-brace-space-before": "always-single-line",
    "color-function-notation": "legacy",
    "color-hex-case": "lower",
    "color-hex-length": ["short", {"severity": "warning"}],
    "color-named": ["never", {"severity": "warning"}],
    "color-no-invalid-hex": true,
    "declaration-block-no-duplicate-properties": [true, {
      "ignore": ["consecutive-duplicates"]
    }],
    "declaration-block-semicolon-newline-after": "always-multi-line",
    "declaration-block-trailing-semicolon": ["always", {"severity": "warning"}],
    "function-calc-no-invalid": true,
    "function-max-empty-lines": 0,
    "function-name-case": "lower",
    "hue-degree-notation": "angle",
    "keyframe-declaration-no-important": [true, {"severity": "warning"}],
    "length-zero-no-unit": true,
    "max-empty-lines": 1,
    "max-nesting-depth": [5, {
      "ignore": ["pseudo-classes"]
    }],
    "media-feature-name-case": "lower",
    "no-duplicate-selectors": true,
    "no-empty-source": true,
    "no-extra-semicolons": true,
    "no-invalid-double-slash-comments": true,
    "no-missing-end-of-source-newline": true,
    "no-unknown-animations": true,
    "no-descending-specificity": null,
    "order/order": [
      [
        "declarations",
        {
          "type": "rule",
          "selector": "^&:(before|after)"
        },
        {
          "type": "rule",
          "selector": "^&:\\w"
        },
        {
          "type": "rule",
          "selector": "^&.__"
        },
        {
          "type": "rule",
          "selector": "^& ."
        },
        {
          "type": "at-rule",
          "name": "media"
        }
      ],
      {"severity": "warning"}
    ],
    "order/properties-order": [[], {"severity": "warning"}],
    "property-case": "lower",
    "selector-attribute-quotes": "always",
    "selector-max-empty-lines": 0,
    "selector-no-vendor-prefix": [true, {"severity": "warning"}],
    "selector-type-case": "lower",
    "selector-type-no-unknown": true,
    "selector-pseudo-class-no-unknown": true,
    "selector-pseudo-class-parentheses-space-inside": "never",
    "selector-pseudo-element-no-unknown": true,
    "shorthand-property-no-redundant-values": true,
    "selector-attribute-operator-space-after": "never",
    "selector-attribute-operator-space-before": "never",
    "selector-attribute-brackets-space-inside": "never",
    "string-no-newline": true,
    "string-quotes": "double",
    "unit-case": "lower",
    "unit-no-unknown": [true, {
      "ignoreFunctions":
      [
        "resolve",
        "percentage"
      ]
    }],
    "selector-combinator-space-after": "always",
    "selector-combinator-space-before": "always",
    "selector-descendant-combinator-no-non-space": true,
    "plugin/rational-order": [true, {
      "border-in-box-model": false,
      "empty-line-between-groups": false
    }],
    "property-no-unknown": [true, {
      "ignoreProperties": [
        "font-range",
        "min-font-size",
        "max-font-size",
        "lower-font-range",
        "upper-font-range",
        "min-line-height",
        "max-line-height",
        "lower-line-height-range",
        "upper-line-height-range",
        "min-letter-spacing",
        "max-letter-spacing",
        "lower-letter-spacing-range",
        "upper-letter-spacing-range"
      ]
    }],
    "property-no-vendor-prefix": [true, {"severity": "warning"}],
    "selector-max-compound-selectors": 5,
    "selector-nested-pattern": "^(?!& .__)(&[ .#:])",
    "selector-max-id": 1,
    "selector-max-attribute": 1,
    "selector-max-type": 2,
    "selector-max-universal": 1,
    "selector-no-qualifying-type": [true, {
      "ignore": ["attribute"]
    }],
    "declaration-no-important": [true, {"severity": "warning"}],
    "selector-class-pattern": ["^[a-z_0-9-]+$", {"resolveNestedSelectors": true}],
    "scss/dollar-variable-pattern": "^[a-z_]+$",
    "scss/percent-placeholder-pattern": "^[a-z_]+$",
    "rule-empty-line-before": ["always-multi-line", {
      "except": ["first-nested"],
      "ignore": ["after-comment"]
    }],
    "selector-list-comma-space-before": "always-single-line",
    "selector-pseudo-class-case": "lower",
    "indentation": 2,
    "comment-no-empty": [true, {"severity": "warning"}],
    "font-family-name-quotes": "always-where-recommended",
    "value-keyword-case": "lower",
    "value-list-comma-newline-after": "always-multi-line",
    "value-list-comma-space-after": "always-single-line",
    "value-list-comma-space-before": "never",
    "value-list-max-empty-lines": 0,
    "value-no-vendor-prefix": [true, {"severity": "warning"}],
    "plugin/no-unsupported-browser-features": [null, {
      "browsers": "last 10 versions, Chrome >= 40, Firefox >= 40, not IE < 10, not OperaMobile <= 12.5, Safari > 6, Opera > 12.5, IOS > 6, not Android < 4.2",
      "severity": "warning"
    }]
  },
  "overrides": [
    {
      "files": [
        "**/*.module.pcss"
      ],
      "rules": {
        "max-empty-lines": 3,
        "at-rule-name-space-after": "always",
        "declaration-block-no-redundant-longhand-properties": [
          true,
          {
            "severity": "warning"
          }
        ],
        "declaration-empty-line-before": "never",
        "font-family-no-duplicate-names": true,
        "max-nesting-depth": [
          3,
          {
            "ignore": [
              "pseudo-classes"
            ]
          }
        ],
        "number-leading-zero": "never",
        "number-no-trailing-zeros": true,
        "order/order": [
          [
            "at-rules",
            "custom-properties",
            "declarations",
            "dollar-variables",
            "rules"
          ],
          {
            "severity": "warning"
          }
        ],
        "order/properties-order": [
          [
            "composes",
            "content"
          ],
          {
            "severity": "warning",
            "unspecified": "bottom"
          }
        ],
        "plugin/no-unsupported-browser-features": [
          null,
          {
            "browsers": "last 10 versions, Chrome >= 40, Firefox >= 40, not OperaMobile <= 12.5, Safari > 9, Opera > 12.5, IOS > 9, not Android < 4.2",
            "severity": "warning"
          }
        ],
        "selector-class-pattern": [
          "^[a-z][a-zA-Z0-9]*(_[a-z][a-zA-Z0-9]*){0,1}$",
          {
            "resolveNestedSelectors": true
          }
        ],
        "selector-pseudo-class-no-unknown": [
          true,
          {
            "ignorePseudoClasses": [
              "global",
              "local"
            ]
          }
        ],
        "value-keyword-case": [
          "lower",
          {
            "ignoreProperties": [
              "composes",
              "font-family"
            ]
          }
        ]
      }
    }
  ],
  "ignoreFiles": [
    "**/css-min/**"
  ]
}
  • Вопрос задан
  • 344 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы