From 3c9225936974b8ed2fd424a9bf73c250e0c76338 Mon Sep 17 00:00:00 2001 From: Josh Black Date: Thu, 28 Mar 2024 10:27:11 -0500 Subject: [PATCH] Update link for spacing plugin (#391) * Update spacing.js * test: update test snapshot --- __tests__/spacing.js | 18 +++++++++--------- package-lock.json | 4 ++-- plugins/spacing.js | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/__tests__/spacing.js b/__tests__/spacing.js index fc2731e3..80aead78 100644 --- a/__tests__/spacing.js +++ b/__tests__/spacing.js @@ -42,7 +42,7 @@ testRule({ code: '.x { padding-bottom: 0.3em; }', unfixable: true, message: - "Please use a primer spacer variable instead of '0.3em'. Consult the primer docs for a suitable replacement. https://primer.style/css/support/spacing (primer/spacing)", + "Please use a primer spacer variable instead of '0.3em'. Consult the primer docs for a suitable replacement. https://primer.style/css/storybook/?path=/docs/support-spacing--docs (primer/spacing)", line: 1, column: 22, description: 'Errors on non-spacer em values.', @@ -90,7 +90,7 @@ testRule({ rule: 'primer/spacing', severity: 'error', message: - "Please use a primer spacer variable instead of '6px'. Consult the primer docs for a suitable replacement. https://primer.style/css/support/spacing (primer/spacing)", + "Please use a primer spacer variable instead of '6px'. Consult the primer docs for a suitable replacement. https://primer.style/css/storybook/?path=/docs/support-spacing--docs (primer/spacing)", }, { column: 32, @@ -98,7 +98,7 @@ testRule({ rule: 'primer/spacing', severity: 'error', message: - "Please use a primer spacer variable instead of '12px'. Consult the primer docs for a suitable replacement. https://primer.style/css/support/spacing (primer/spacing)", + "Please use a primer spacer variable instead of '12px'. Consult the primer docs for a suitable replacement. https://primer.style/css/storybook/?path=/docs/support-spacing--docs (primer/spacing)", }, ], }, @@ -113,7 +113,7 @@ testRule({ rule: 'primer/spacing', severity: 'error', message: - "Please use a primer spacer variable instead of '3px'. Consult the primer docs for a suitable replacement. https://primer.style/css/support/spacing (primer/spacing)", + "Please use a primer spacer variable instead of '3px'. Consult the primer docs for a suitable replacement. https://primer.style/css/storybook/?path=/docs/support-spacing--docs (primer/spacing)", }, { column: 19, @@ -128,7 +128,7 @@ testRule({ code: '.x { padding: $spacer-100; }', unfixable: true, message: - "Please use a primer spacer variable instead of '$spacer-100'. Consult the primer docs for a suitable replacement. https://primer.style/css/support/spacing (primer/spacing)", + "Please use a primer spacer variable instead of '$spacer-100'. Consult the primer docs for a suitable replacement. https://primer.style/css/storybook/?path=/docs/support-spacing--docs (primer/spacing)", line: 1, column: 15, description: 'Errors on non-primer spacer.', @@ -137,7 +137,7 @@ testRule({ code: '.x { margin-right: (-$spacing-task-item-1); }', unfixable: true, message: - "Please use a primer spacer variable instead of '-$spacing-task-item-1'. Consult the primer docs for a suitable replacement. https://primer.style/css/support/spacing (primer/spacing)", + "Please use a primer spacer variable instead of '-$spacing-task-item-1'. Consult the primer docs for a suitable replacement. https://primer.style/css/storybook/?path=/docs/support-spacing--docs (primer/spacing)", line: 1, column: 21, description: 'Errors on non-primer spacer in parens.', @@ -153,7 +153,7 @@ testRule({ rule: 'primer/spacing', severity: 'error', message: - "Please use a primer spacer variable instead of '3px'. Consult the primer docs for a suitable replacement. https://primer.style/css/support/spacing (primer/spacing)", + "Please use a primer spacer variable instead of '3px'. Consult the primer docs for a suitable replacement. https://primer.style/css/storybook/?path=/docs/support-spacing--docs (primer/spacing)", }, { column: 34, @@ -161,7 +161,7 @@ testRule({ rule: 'primer/spacing', severity: 'error', message: - "Please use a primer spacer variable instead of '3px'. Consult the primer docs for a suitable replacement. https://primer.style/css/support/spacing (primer/spacing)", + "Please use a primer spacer variable instead of '3px'. Consult the primer docs for a suitable replacement. https://primer.style/css/storybook/?path=/docs/support-spacing--docs (primer/spacing)", }, { column: 53, @@ -169,7 +169,7 @@ testRule({ rule: 'primer/spacing', severity: 'error', message: - "Please use a primer spacer variable instead of '3px'. Consult the primer docs for a suitable replacement. https://primer.style/css/support/spacing (primer/spacing)", + "Please use a primer spacer variable instead of '3px'. Consult the primer docs for a suitable replacement. https://primer.style/css/storybook/?path=/docs/support-spacing--docs (primer/spacing)", }, ], }, diff --git a/package-lock.json b/package-lock.json index 646e94b4..2db1cb5d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@primer/stylelint-config", - "version": "12.8.0", + "version": "12.9.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@primer/stylelint-config", - "version": "12.8.0", + "version": "12.9.2", "license": "MIT", "dependencies": { "anymatch": "^3.1.1", diff --git a/plugins/spacing.js b/plugins/spacing.js index 75d43ee6..05917937 100644 --- a/plugins/spacing.js +++ b/plugins/spacing.js @@ -28,7 +28,7 @@ const ruleName = 'primer/spacing' const messages = stylelint.utils.ruleMessages(ruleName, { rejected: (value, replacement) => { if (replacement === null) { - return `Please use a primer spacer variable instead of '${value}'. Consult the primer docs for a suitable replacement. https://primer.style/css/support/spacing` + return `Please use a primer spacer variable instead of '${value}'. Consult the primer docs for a suitable replacement. https://primer.style/css/storybook/?path=/docs/support-spacing--docs` } return `Please replace ${value} with spacing variable '${replacement}'.`