RJWadley / stylelint-no-unsupported-browser-features

Disallow features that aren't supported by your target browser audience.
426 stars 20 forks source link

Performance issue after upgrading to v7.0.0 #292

Open WojtekMasiukiewicz opened 1 year ago

WojtekMasiukiewicz commented 1 year ago

After upgrading to version v7.0.0, there is a performance issue with the plugin. The execution time of the command stylelint "./src/*/.{tsx,ts,css} has increased dramatically by two times. The configuration has been adjusted for the new rules. The test has been repeated for versions v6.1.0 and v7.0.0. Below are the results:

    "stylelint": "15.10.2",
    "stylelint-config-standard": "34.0.0",

.stylelintrc config:

{
  "extends": ["stylelint-config-standard"],
  "rules": {
    "comment-empty-line-before": null,
    "declaration-empty-line-before": null,
    "media-feature-range-notation": null,
    "media-query-no-invalid": null,
    "no-descending-specificity": null,
    "no-empty-source": null,
    "rule-empty-line-before": null,
    "selector-class-pattern": null,
    "selector-pseudo-element-colon-notation": null,
    "selector-type-no-unknown": null,
    "plugin/no-unsupported-browser-features": [
      true,
      {
        "ignorePartialSupport": true,
        "ignore": [
          "css-autofill",
          "css-backdrop-filter",
          "css-color-function",
          "css-focus-visible",
          "css-math-functions",
          "css-nesting",
          "css-not-sel-list",
          "css-overflow-anchor",
          "css-scroll-behavior"
        ]
      }
    ]
  },
  "customSyntax": "postcss-styled-syntax",
  "plugins": ["stylelint-no-unsupported-browser-features"]
}

v6.1.0: image

v7.0.0 image

RJWadley commented 1 year ago

this is probably because the latest doiuse is checking a lot more rules. will look into it.

RJWadley commented 6 months ago

this should help once its merged: https://github.com/anandthakker/doiuse/pull/182