From cd11dc162ea097dfe268566960d4ad7f79b8567a Mon Sep 17 00:00:00 2001 From: andrescastellanos-coderabbit Date: Mon, 27 Apr 2026 12:52:02 -0500 Subject: [PATCH 1/2] Preview/Stylelint: add CSS and SCSS files triggering Stylelint findings across error and warning severities --- .stylelintrc.json | 21 ++++++++++++ stylelint/_layout.scss | 41 ++++++++++++++++++++++ stylelint/components.scss | 61 +++++++++++++++++++++++++++++++++ stylelint/styles.css | 72 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 195 insertions(+) create mode 100644 .stylelintrc.json create mode 100644 stylelint/_layout.scss create mode 100644 stylelint/components.scss create mode 100644 stylelint/styles.css diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 0000000..d7edca6 --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,21 @@ +{ + "rules": { + "color-no-invalid-hex": [true, { "severity": "error" }], + "property-no-unknown": [true, { "severity": "error" }], + "unit-no-unknown": [true, { "severity": "error" }], + "selector-type-no-unknown": [true, { "severity": "error" }], + "block-no-empty": [true, { "severity": "error" }], + "comment-no-empty": [true, { "severity": "error" }], + "at-rule-no-unknown": [true, { "severity": "error" }], + "function-no-unknown": [true, { "severity": "error" }], + "declaration-block-no-shorthand-property-overrides": [true, { "severity": "error" }], + "declaration-block-no-duplicate-properties": [true, { "severity": "warning" }], + "no-duplicate-selectors": [true, { "severity": "warning" }], + "length-zero-no-unit": [true, { "severity": "warning" }], + "shorthand-property-no-redundant-values": [true, { "severity": "warning" }], + "selector-max-id": [1, { "severity": "warning" }], + "selector-class-pattern": ["^[a-z][a-zA-Z0-9-]+$", { "severity": "warning" }], + "max-nesting-depth": [3, { "severity": "warning" }], + "font-family-name-quotes": ["always-where-recommended", { "severity": "warning" }] + } +} diff --git a/stylelint/_layout.scss b/stylelint/_layout.scss new file mode 100644 index 0000000..0076764 --- /dev/null +++ b/stylelint/_layout.scss @@ -0,0 +1,41 @@ +$gutter: 16px; +$breakpoint-md: #notavalidcolor; + +#app #shell #main { + padding: $gutter; + padding: 0px; +} + +.GridContainer { + display: grid; + grid-template-columns: repeat(12, 1fr); + gap: 8px 8px 8px 8px; +} + +.flex_row { + display: flex; + margin: 0px 0px; +} + +.empty { +} + +/* */ + +unknownblock { + display: block; +} + +#header_main { + height: 60px; + height: 80px; +} + +.GridContainer { + background: #ffff; +} + +.col-12 { + width: 100%; + width: 100pixels; +} diff --git a/stylelint/components.scss b/stylelint/components.scss new file mode 100644 index 0000000..e32b4a1 --- /dev/null +++ b/stylelint/components.scss @@ -0,0 +1,61 @@ +@import 'layout'; + +$primary-color: #fff1az; +$accent-color: #ggg; +$muted-color: #d3d3d3; + +.ProductCard { + display: flex; + flex-direction: column; + padding: 12px 12px 12px 12px; + background: $primary-color; + color: #ffffff; + color: #f0f0f0; + + .Header { + display: flex; + align-items: center; + + .Title { + font-size: 18px; + + .Icon { + width: 16px; + + .Inner { + fill: #abc1234; + } + } + } + } + + .body { + padding: 8px 0px; + margin: 0px; + } + + .footer_section { + font-family: Helvetica Neue, sans-serif; + } +} + +.PriceTag { + width: 100pixels; + background: bogus-color($primary-color); + text-decoration-style: bold; +} + +.empty-card { +} + +/* */ + +.ProductCard { + border: 1px solid $muted-color; +} + +@madeUpAtRule { + .responsive-grid { + display: grid; + } +} diff --git a/stylelint/styles.css b/stylelint/styles.css new file mode 100644 index 0000000..f602b96 --- /dev/null +++ b/stylelint/styles.css @@ -0,0 +1,72 @@ +/* base styles for demoapp */ + +:root { + --primary: #fff1az; + --secondary: #abc1234; + --accent: #12; + --muted: #d3d3d3; +} + +body { + colour: #ffffff; + background: var(--primary); + text-style: bold; + margin: 0px; + padding: 0; + font-family: Arial Black, sans-serif; + line-height: 1.5; +} + +/* */ + +.SiteHeader { + display: flex; + padding: 16px 16px 16px 16px; + color: #333; + color: #555; + background: #f5f5f5; +} + +.some_class { + width: 100pixels; + height: 0px; + margin: 5px 5px 5px 5px; +} + +.cta_button { + background: var(--accent); + color: #ffffff; + padding: 8px 12px; + border-radius: 4px; +} + +unknownelement { + display: block; +} + +.empty-block { +} + +@unknownat screen { + .responsive { + display: block; + } +} + +#main #sidebar #widget { + color: #999; +} + +.SiteHeader { + z-index: 10; +} + +.alert { + margin: 5px; + margin-top: 10px; + margin: 8px; +} + +.cta_button { + border: 1px solid #000; +} From de07b776e70eb3886c68ff4272cc593a209c47d5 Mon Sep 17 00:00:00 2001 From: andrescastellanos-coderabbit Date: Mon, 27 Apr 2026 13:03:16 -0500 Subject: [PATCH 2/2] Preview/Stylelint: remove explicit .stylelintrc.json so the wrapper writes its default extending stylelint-config-standard-scss (bare rules-only config without extends prevents the SCSS parser and plugin loading) --- .stylelintrc.json | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .stylelintrc.json diff --git a/.stylelintrc.json b/.stylelintrc.json deleted file mode 100644 index d7edca6..0000000 --- a/.stylelintrc.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "rules": { - "color-no-invalid-hex": [true, { "severity": "error" }], - "property-no-unknown": [true, { "severity": "error" }], - "unit-no-unknown": [true, { "severity": "error" }], - "selector-type-no-unknown": [true, { "severity": "error" }], - "block-no-empty": [true, { "severity": "error" }], - "comment-no-empty": [true, { "severity": "error" }], - "at-rule-no-unknown": [true, { "severity": "error" }], - "function-no-unknown": [true, { "severity": "error" }], - "declaration-block-no-shorthand-property-overrides": [true, { "severity": "error" }], - "declaration-block-no-duplicate-properties": [true, { "severity": "warning" }], - "no-duplicate-selectors": [true, { "severity": "warning" }], - "length-zero-no-unit": [true, { "severity": "warning" }], - "shorthand-property-no-redundant-values": [true, { "severity": "warning" }], - "selector-max-id": [1, { "severity": "warning" }], - "selector-class-pattern": ["^[a-z][a-zA-Z0-9-]+$", { "severity": "warning" }], - "max-nesting-depth": [3, { "severity": "warning" }], - "font-family-name-quotes": ["always-where-recommended", { "severity": "warning" }] - } -}