Skip to content

Commit e7712e7

Browse files
[Polaris Lighthouse] Deduped stylelint-polaris category rules (#7919)
### WHY are these changes introduced? There were rules in multiple categoires ### WHAT is this pull request doing? Deleting redundant rules that were in the wrong category
1 parent 5b5177d commit e7712e7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.changeset/new-toys-battle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/stylelint-polaris': patch
3+
---
4+
5+
Deduped converage rules that were in multiple categories

stylelint-polaris/index.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ const stylelintPolarisCoverageOptions = {
7878
/\$skeleton-shimmer-duration/,
7979
/\$easing-data/,
8080
// Legacy custom properties
81-
/--p-range-slider-thumb-scale/,
8281
/--p-duration-1-0-0/,
8382
/--p-duration-1-5-0/,
8483
],
@@ -187,12 +186,9 @@ const stylelintPolarisCoverageOptions = {
187186
'thumbnail-size',
188187
'icon-size',
189188
'top-bar-height',
190-
'z-index',
191189
].map(matchNameRegExp),
192190
'polaris/at-rule-disallowed-list': {
193191
include: [
194-
'hidden-when-printing',
195-
'print-hidden',
196192
'layout-flex-fix',
197193
'safe-area-for',
198194
'skeleton-page-header-layout',
@@ -210,8 +206,8 @@ const stylelintPolarisCoverageOptions = {
210206
// Legacy custom properties
211207
/--p-range-slider-thumb-size-base/,
212208
/--p-range-slider-thumb-size-active/,
209+
/--p-range-slider-thumb-scale/,
213210
/--p-override-visible/,
214-
/--p-override-loading-z-index/,
215211
/--p-icon-size/,
216212
/--p-choice-size/,
217213
],
@@ -312,8 +308,6 @@ const stylelintPolarisCoverageOptions = {
312308
'polaris/global-disallowed-list': [
313309
// Legacy mixin map-get data
314310
/\$shadows-data/,
315-
/\$fixed-element-stacking-order/,
316-
/\$global-elements/,
317311
// Legacy custom properties
318312
/--p-button-drop-shadow/,
319313
/--p-button-inner-shadow/,
@@ -419,7 +413,8 @@ const stylelintPolarisCoverageOptions = {
419413
'when-typography-condensed',
420414
'when-typography-not-condensed',
421415
'when-not-printing',
422-
'when-printing',
416+
'hidden-when-printing',
417+
'print-hidden',
423418
].map(matchNameRegExp),
424419
},
425420
},

0 commit comments

Comments
 (0)