Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/afraid-windows-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/stylelint-polaris': patch
---

Temporarily disable layout category
152 changes: 76 additions & 76 deletions stylelint-polaris/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,82 +140,82 @@ const stylelintPolarisCoverageOptions = {
message: 'Please use a Polaris font token or typography component',
},
],
layout: [
{
'declaration-property-value-disallowed-list': [
{
top: [/(?!var\(--p-).+$/],
bottom: [/(?!var\(--p-).+$/],
left: [/(?!var\(--p-).+$/],
right: [/(?!var\(--p-).+$/],
'/^width/': [/(?!var\(--p-).+$/],
'/^height/': [/(?!var\(--p-).+$/],
},
{severity: 'warning'},
],
'property-disallowed-list': [
[
'position',
'grid',
'flex',
'flex-grow',
'flex-shrink',
'flex-basis',
'justify-content',
'align-items',
'grid-row',
'grid-row-start',
'grid-row-end',
'grid-column',
'grid-column-start',
'grid-column-end',
'grid-template',
'grid-template-areas',
'grid-template-rows',
'grid-template-columns',
'grid-area',
'display',
],
{severity: 'warning'},
],
'function-disallowed-list': [
'nav-min-window-corrected',
'control-height',
'control-slim-height',
'mobile-nav-width',
'thumbnail-size',
'icon-size',
'top-bar-height',
].map(matchNameRegExp),
'polaris/at-rule-disallowed-list': {
include: [
'layout-flex-fix',
'safe-area-for',
'skeleton-page-header-layout',
'skeleton-page-secondary-actions-layout',
].map(matchNameRegExp),
},
'polaris/global-disallowed-list': [
// Legacy mixin map-get data
/\$layout-width-data/,
/\$navigation-width/,
/\$small-thumbnail-size/,
/\$large-thumbnail-size/,
/\$medium-thumbnail-size/,
/\$thumbnail-sizes/,
// Legacy custom properties
/--p-range-slider-thumb-size-base/,
/--p-range-slider-thumb-size-active/,
/--p-range-slider-thumb-scale/,
/--p-override-visible/,
/--p-icon-size/,
/--p-choice-size/,
],
},
{
message: 'Please use a Polaris layout component',
},
],
// layout: [
// {
// 'declaration-property-value-disallowed-list': [
// {
// top: [/(?!var\(--p-).+$/],
// bottom: [/(?!var\(--p-).+$/],
// left: [/(?!var\(--p-).+$/],
// right: [/(?!var\(--p-).+$/],
// '/^width/': [/(?!var\(--p-).+$/],
// '/^height/': [/(?!var\(--p-).+$/],
// },
// {severity: 'warning'},
// ],
// 'property-disallowed-list': [
// [
// 'position',
// 'grid',
// 'flex',
// 'flex-grow',
// 'flex-shrink',
// 'flex-basis',
// 'justify-content',
// 'align-items',
// 'grid-row',
// 'grid-row-start',
// 'grid-row-end',
// 'grid-column',
// 'grid-column-start',
// 'grid-column-end',
// 'grid-template',
// 'grid-template-areas',
// 'grid-template-rows',
// 'grid-template-columns',
// 'grid-area',
// 'display',
// ],
// {severity: 'warning'},
// ],
// 'function-disallowed-list': [
// 'nav-min-window-corrected',
// 'control-height',
// 'control-slim-height',
// 'mobile-nav-width',
// 'thumbnail-size',
// 'icon-size',
// 'top-bar-height',
// ].map(matchNameRegExp),
// 'polaris/at-rule-disallowed-list': {
// include: [
// 'layout-flex-fix',
// 'safe-area-for',
// 'skeleton-page-header-layout',
// 'skeleton-page-secondary-actions-layout',
// ].map(matchNameRegExp),
// },
// 'polaris/global-disallowed-list': [
// // Legacy mixin map-get data
// /\$layout-width-data/,
// /\$navigation-width/,
// /\$small-thumbnail-size/,
// /\$large-thumbnail-size/,
// /\$medium-thumbnail-size/,
// /\$thumbnail-sizes/,
// // Legacy custom properties
// /--p-range-slider-thumb-size-base/,
// /--p-range-slider-thumb-size-active/,
// /--p-range-slider-thumb-scale/,
// /--p-override-visible/,
// /--p-icon-size/,
// /--p-choice-size/,
// ],
// },
// {
// message: 'Please use a Polaris layout component',
// },
// ],
spacing: [
{
'function-disallowed-list': ['control-vertical-padding', 'spacing'].map(
Expand Down