From 9b9f4c7f58f39c127b25c6a166eef795227d511b Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Fri, 12 Jul 2024 23:02:32 +0900 Subject: [PATCH] Fix deprecated `scss/at-import-partial-extension` Since `stylelint-scss@6.4.0`, `scss/at-import-partial-extension` has been deprecated. Here is the warning message: ``` The "scss/at-import-partial-extension" rule is deprecated. 'at-import-partial-extension has been deprecated, and will be removed in '7.0'. Use 'load-partial-extension' instead. ``` See https://github.com/stylelint-scss/stylelint-scss/releases/tag/v6.4.0 --- index.js | 2 +- package.json | 2 +- test/test.js | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 6ef3e50..dbfb8e2 100644 --- a/index.js +++ b/index.js @@ -27,7 +27,7 @@ const config = { 'scss/at-function-parentheses-space-before': 'never', 'scss/at-function-pattern': reLowercase, 'scss/at-if-no-null': true, - 'scss/at-import-partial-extension': 'never', + 'scss/load-partial-extension': 'never', 'scss/at-mixin-argumentless-call-parentheses': 'never', 'scss/at-mixin-parentheses-space-before': 'never', 'scss/at-mixin-pattern': reLowercase, diff --git a/package.json b/package.json index 8a21cb2..fafebf3 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "dependencies": { "postcss-scss": "^4.0.9", "stylelint-config-xo": "^1.0.0", - "stylelint-scss": "^6.2.1" + "stylelint-scss": "^6.4.0" }, "devDependencies": { "ava": "^6.1.2", diff --git a/test/test.js b/test/test.js index 7932268..f9d3655 100644 --- a/test/test.js +++ b/test/test.js @@ -12,7 +12,8 @@ const runStylelint = async code => { for (const result of results) { if (result.deprecations.length > 0) { - throw new Error(`Deprecations:\n${result.deprecations.join('\n')}`); + const warnings = result.deprecations.map(x => x.text).join('\n'); + throw new Error(`Deprecations:\n${warnings}`); } if (result.invalidOptionWarnings.length > 0) {