From 14c5d685c1e3f5d85d60e5ed0220bb044b5ff57f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 Feb 2023 13:37:22 +0800 Subject: [PATCH] chore(deps): update dependency stylelint to v15 (#40687) * chore(deps): update dependency stylelint to v15 * Update package.json * test: remove stylelint-config-prettier * test: remove stylelint-config-prettier * stylelint@15 * json to js --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: afc163 Co-authored-by: yoyo837 --- .stylelintrc.js | 40 ++++++++++++++++++++++++++++++++++++++++ .stylelintrc.json | 43 ------------------------------------------- package.json | 7 +++---- 3 files changed, 43 insertions(+), 47 deletions(-) create mode 100644 .stylelintrc.js delete mode 100644 .stylelintrc.json diff --git a/.stylelintrc.js b/.stylelintrc.js new file mode 100644 index 0000000000..8b65ae4179 --- /dev/null +++ b/.stylelintrc.js @@ -0,0 +1,40 @@ +module.exports = { + extends: ['stylelint-config-standard', 'stylelint-config-rational-order'], + // 使用 stylelint 来 lint css in js? https://github.com/emotion-js/emotion/discussions/2694 + plugins: ['stylelint-prettier'], + rules: { + 'prettier/prettier': true, + 'function-name-case': ['lower'], + 'function-no-unknown': [ + true, + { + ignoreFunctions: [ + 'fade', + 'fadeout', + 'tint', + 'darken', + 'ceil', + 'fadein', + 'floor', + 'unit', + 'shade', + 'lighten', + 'percentage', + '-', + ], + }, + ], + 'import-notation': null, + 'no-descending-specificity': null, + 'no-invalid-position-at-import-rule': null, + 'declaration-empty-line-before': null, + 'keyframes-name-pattern': null, + 'custom-property-pattern': null, + 'number-max-precision': 8, + 'alpha-value-notation': 'number', + 'color-function-notation': 'legacy', + 'selector-class-pattern': null, + 'selector-id-pattern': null, + 'selector-not-notation': null, + }, +}; diff --git a/.stylelintrc.json b/.stylelintrc.json deleted file mode 100644 index 4d48dbf970..0000000000 --- a/.stylelintrc.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "extends": [ - "stylelint-config-standard", - "stylelint-config-rational-order", - "stylelint-config-prettier" - ], - "customSyntax": "postcss-less", - "plugins": ["stylelint-declaration-block-no-ignored-properties"], - "rules": { - "function-name-case": ["lower"], - "function-no-unknown": [ - true, - { - "ignoreFunctions": [ - "fade", - "fadeout", - "tint", - "darken", - "ceil", - "fadein", - "floor", - "unit", - "shade", - "lighten", - "percentage", - "-" - ] - } - ], - "import-notation": null, - "no-descending-specificity": null, - "no-invalid-position-at-import-rule": null, - "declaration-empty-line-before": null, - "keyframes-name-pattern": null, - "custom-property-pattern": null, - "number-max-precision": 8, - "alpha-value-notation": "number", - "color-function-notation": "legacy", - "selector-class-pattern": null, - "selector-id-pattern": null, - "selector-not-notation": null - } -} diff --git a/package.json b/package.json index 919499ee8e..0b981765c1 100644 --- a/package.json +++ b/package.json @@ -272,11 +272,10 @@ "semver": "^7.3.5", "simple-git": "^3.0.0", "size-limit": "^8.1.0", - "stylelint": "^14.9.0", - "stylelint-config-prettier": "^9.0.2", + "stylelint": "^15.1.0", "stylelint-config-rational-order": "^0.1.2", - "stylelint-config-standard": "^29.0.0", - "stylelint-declaration-block-no-ignored-properties": "^2.1.0", + "stylelint-config-standard": "^30.0.0", + "stylelint-prettier": "^2.0.0", "sylvanas": "^0.6.1", "terser": "^5.16.1", "ts-node": "^10.8.2",