From 7c7f030d54a0c6e266965f9a6da60ffcc0a66e33 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 4 Aug 2020 14:50:46 -0700 Subject: [PATCH] styles: Enable most stylelint-config-recommended rules. Signed-off-by: Anders Kaseorg --- package.json | 1 + stylelint.config.js | 13 ++++++++++++- version.py | 2 +- yarn.lock | 5 +++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index efebd0a913..f82c3977e5 100644 --- a/package.json +++ b/package.json @@ -103,6 +103,7 @@ "source-map": "^0.6.1", "stylelint": "^13.0.0", "stylelint-config-prettier": "^8.0.2", + "stylelint-config-recommended": "^3.0.0", "svgo": "^1.2.2", "swagger-parser": "^10.0.0", "typescript": "^3.5.1", diff --git a/stylelint.config.js b/stylelint.config.js index 851c2e4773..72b09f3765 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -1,8 +1,19 @@ "use strict"; module.exports = { - extends: ["stylelint-config-prettier"], + extends: ["stylelint-config-recommended", "stylelint-config-prettier"], rules: { + // Add some exceptions for recommended rules + "at-rule-no-unknown": [true, {ignoreAtRules: ["extend"]}], + "property-no-unknown": [true, {ignoreProperties: [/^mso-/, "user-drag"]}], + + // Disable recommended rules we don't comply with yet + "declaration-block-no-duplicate-properties": null, + "declaration-block-no-shorthand-property-overrides": null, + "font-family-no-missing-generic-family-keyword": null, + "no-descending-specificity": null, + "no-duplicate-selectors": null, + // Stylistic rules for CSS. "function-whitespace-after": "always", diff --git a/version.py b/version.py index a1ed2d5b8a..529d487db6 100644 --- a/version.py +++ b/version.py @@ -44,4 +44,4 @@ API_FEATURE_LEVEL = 27 # historical commits sharing the same major version, in which case a # minor version bump suffices. -PROVISION_VERSION = '95.1' +PROVISION_VERSION = '95.2' diff --git a/yarn.lock b/yarn.lock index 1a05e561f2..e8618c94bb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11345,6 +11345,11 @@ stylelint-config-prettier@^8.0.2: resolved "https://registry.yarnpkg.com/stylelint-config-prettier/-/stylelint-config-prettier-8.0.2.tgz#da9de33da4c56893cbe7e26df239a7374045e14e" integrity sha512-TN1l93iVTXpF9NJstlvP7nOu9zY2k+mN0NSFQ/VEGz15ZIP9ohdDZTtCWHs5LjctAhSAzaILULGbgiM0ItId3A== +stylelint-config-recommended@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/stylelint-config-recommended/-/stylelint-config-recommended-3.0.0.tgz#e0e547434016c5539fe2650afd58049a2fd1d657" + integrity sha512-F6yTRuc06xr1h5Qw/ykb2LuFynJ2IxkKfCMf+1xqPffkxh0S09Zc902XCffcsw/XMFq/OzQ1w54fLIDtmRNHnQ== + stylelint@^13.0.0: version "13.6.1" resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-13.6.1.tgz#cc1d76338116d55e8ff2be94c4a4386c1239b878"