From e789a8bb2034629d90330d592bfb313359b338fd Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 5 Aug 2020 16:53:56 -0700 Subject: [PATCH] stylelint: Enable no-vendor-prefix rules. Our vendor prefixes are generated by autoprefixer. Signed-off-by: Anders Kaseorg --- stylelint.config.js | 8 +++++++- templates/zerver/emails/stylelint.config.js | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 templates/zerver/emails/stylelint.config.js diff --git a/stylelint.config.js b/stylelint.config.js index 50dd58be14..d87c597981 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -5,7 +5,6 @@ module.exports = { rules: { // Add some exceptions for recommended rules "at-rule-no-unknown": [true, {ignoreAtRules: ["extend"]}], - "property-no-unknown": [true, {ignoreProperties: [/^mso-/]}], // Disable recommended rules we don't comply with yet "font-family-no-missing-generic-family-keyword": null, @@ -37,5 +36,12 @@ module.exports = { // Zulip CSS should have no dependencies on external resources "function-url-no-scheme-relative": true, "function-url-scheme-whitelist": [], + + // We use autoprefixer to generate vendor prefixes + "at-rule-no-vendor-prefix": true, + "media-feature-name-no-vendor-prefix": true, + "property-no-vendor-prefix": true, + "selector-no-vendor-prefix": true, + "value-no-vendor-prefix": true, }, }; diff --git a/templates/zerver/emails/stylelint.config.js b/templates/zerver/emails/stylelint.config.js new file mode 100644 index 0000000000..8b2c4154bc --- /dev/null +++ b/templates/zerver/emails/stylelint.config.js @@ -0,0 +1,16 @@ +"use strict"; + +module.exports = { + extends: ["../../../stylelint.config"], + rules: { + // Add some exceptions for recommended rules + "property-no-unknown": [true, {ignoreProperties: [/^mso-/]}], + + // We don't run autoprefixer on email CSS + "at-rule-no-vendor-prefix": null, + "media-feature-name-no-vendor-prefix": null, + "property-no-vendor-prefix": null, + "selector-no-vendor-prefix": null, + "value-no-vendor-prefix": null, + }, +};