From 5288b8206cc596750275251d544d230ec0627415 Mon Sep 17 00:00:00 2001 From: Aaron Casanova <32409546+aaronccasanova@users.noreply.github.com> Date: Thu, 26 Jan 2023 10:19:03 -0800 Subject: [PATCH] Temporarily disable layout category --- .changeset/afraid-windows-shout.md | 5 + stylelint-polaris/index.js | 152 ++++++++++++++--------------- 2 files changed, 81 insertions(+), 76 deletions(-) create mode 100644 .changeset/afraid-windows-shout.md diff --git a/.changeset/afraid-windows-shout.md b/.changeset/afraid-windows-shout.md new file mode 100644 index 00000000000..e7e3d07c8d1 --- /dev/null +++ b/.changeset/afraid-windows-shout.md @@ -0,0 +1,5 @@ +--- +'@shopify/stylelint-polaris': patch +--- + +Temporarily disable layout category diff --git a/stylelint-polaris/index.js b/stylelint-polaris/index.js index 73aa0e58ed1..cf8821d3381 100644 --- a/stylelint-polaris/index.js +++ b/stylelint-polaris/index.js @@ -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(