Skip to content

Commit 6e3452f

Browse files
authored
chore: add scss linter (#2298)
1 parent 170ea51 commit 6e3452f

File tree

70 files changed

+759
-182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+759
-182
lines changed

.stylelintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apps/docs/out/
2+
packages/design-tokens/dist/
3+
packages/stylesheet/dist/
4+
packages/components/dist/

apps/docs/src/app/_components/layout/Footer/footer.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
.feedbackImage {
2525
display: none;
2626
}
27+
2728
.footerContent {
2829
padding-inline: var(--size-px--xl);
2930
}

apps/docs/src/app/global.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
html {
88
scroll-behavior: smooth;
9-
data-scroll-behavior: smooth;
109
}
1110

1211
body {

apps/docs/src/app/layout.module.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.body {
22
--header-height: 72px;
3+
34
background-color: var(--neutral--color--300);
45
isolation: isolate;
56

@@ -28,6 +29,7 @@
2829
position: sticky;
2930
top: 0;
3031
z-index: 1;
32+
3133
&.scrolled {
3234
box-shadow: var(--shadow--content);
3335
}
@@ -121,9 +123,8 @@
121123
padding: 0;
122124

123125
.homeImage {
124-
border-bottom-color: var(--separator--color);
125-
border-bottom-width: var(--separator--height);
126-
border-bottom-style: var(--border-style--default);
126+
border-bottom: var(--separator--height) var(--border-style--default)
127+
var(--separator--color);
127128
}
128129

129130
.homeTopContent {
@@ -143,6 +144,7 @@
143144
display: flex;
144145
padding-block: var(--size-px--m);
145146
}
147+
146148
.mobileNavigationOffCanvas {
147149
h3 {
148150
display: none;

apps/docs/src/lib/liveCode/components/LiveCodeEditor/LiveCodeEditor.module.css

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
.preview {
2+
padding: var(--size-px--l);
3+
}
4+
15
.liveCodeEditor {
26
--border-color: var(--neutral-outline-border-color);
7+
38
border: 1px solid var(--border-color);
49
border-radius: var(--corner-radius--default);
510
background-color: var(--neutral--color--200);
@@ -36,6 +41,19 @@
3641
.preview {
3742
background-color: var(--primary--color--1000);
3843
}
44+
45+
.mobile {
46+
height: 100%;
47+
48+
.preview {
49+
border-inline: 4px solid var(--neutral--color--500);
50+
margin: 0 auto;
51+
padding: var(--size-px--l);
52+
max-width: 400px;
53+
background-color: var(--neutral--color--100);
54+
height: 100%;
55+
}
56+
}
3957
}
4058
}
4159

@@ -59,29 +77,10 @@
5977
}
6078
}
6179

62-
.preview {
63-
padding: var(--size-px--l);
64-
}
65-
6680
.editorContainer {
6781
overflow-x: auto;
6882
}
6983

70-
.darkBackground {
71-
.mobile {
72-
height: 100%;
73-
74-
.preview {
75-
border-inline: 4px solid var(--neutral--color--500);
76-
margin: 0 auto;
77-
padding: var(--size-px--l);
78-
max-width: 400px;
79-
background-color: var(--neutral--color--100);
80-
height: 100%;
81-
}
82-
}
83-
}
84-
8584
.toggleCode {
8685
width: 100% !important;
8786
outline-offset: calc(var(--size-px--xxs) * -1) !important;
@@ -103,6 +102,7 @@
103102
border-top: 1px solid var(--border-color);
104103
display: flex;
105104
justify-content: center;
105+
106106
button {
107107
padding-block: var(--size-px--s);
108108
}
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
.row {
22
display: flex;
3-
flex-direction: row;
4-
flex-wrap: wrap;
5-
column-gap: var(--size-rem--m);
6-
row-gap: var(--size-rem--m);
3+
flex-flow: row wrap;
4+
gap: var(--size-rem--m);
75
align-items: center;
86
}

apps/docs/src/lib/mdx/components/DesignTokenTable/Samples/Sample.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
width: fit-content;
2424
border-radius: 4px;
2525
border: solid 1px;
26+
2627
&:where(.padding) {
2728
background: repeating-linear-gradient(
2829
45deg,
@@ -33,6 +34,7 @@
3334
);
3435
border-color: var(--color--soft-contrast-violet--700);
3536
}
37+
3638
&:where(.margin) {
3739
background: repeating-linear-gradient(
3840
45deg,
@@ -50,10 +52,12 @@
5052
padding: 25px 20px;
5153
border: 1px solid;
5254
border-radius: 4px;
55+
5356
&:where(.padding) {
5457
color: var(--color--soft-contrast-violet--800);
5558
border-color: var(--color--soft-contrast-violet--800);
5659
}
60+
5761
&:where(.margin) {
5862
color: var(--color--super-teal--800);
5963
border-color: var(--color--super-teal--800);

apps/docs/src/lib/mdx/components/MdxFileView/customComponents.module.css

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,19 @@
3030
.anchorLinkHeading {
3131
width: fit-content;
3232
scroll-margin-top: 6rem;
33+
3334
> span {
3435
display: flex;
3536
align-items: center;
3637
column-gap: var(--size-rem--s);
3738
}
39+
3840
.anchorButton {
3941
opacity: 0;
4042
transition-property: opacity;
4143
transition-duration: var(--transition--duration--fast);
4244
}
45+
4346
&:hover {
4447
.anchorButton {
4548
opacity: 1;
@@ -107,14 +110,17 @@
107110
"firstContent secondContent";
108111
grid-template-columns: 1fr 1fr;
109112

110-
.doAndDontCode:first-of-type,
111-
.doAndDontText:first-of-type {
112-
grid-area: firstExample;
113-
}
113+
.doAndDontCode,
114+
.doAndDontText {
115+
margin-bottom: 0;
114116

115-
.doAndDontCode:last-of-type,
116-
.doAndDontText:last-of-type {
117-
grid-area: secondExample;
117+
&:last-of-type {
118+
grid-area: secondExample;
119+
}
120+
121+
&:first-of-type {
122+
grid-area: firstExample;
123+
}
118124
}
119125

120126
.doAndDontContent:first-of-type {
@@ -124,11 +130,6 @@
124130
.doAndDontContent:last-of-type {
125131
grid-area: secondContent;
126132
}
127-
128-
.doAndDontCode,
129-
.doAndDontText {
130-
margin-bottom: 0;
131-
}
132133
}
133134

134135
@media (max-width: 1200px) {

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"dev": "nx build:deps $@ && concurrently \"yarn watch $@\" \"yarn nx dev $@\"",
1818
"dev:init-githooks": "pnpm dlx simple-git-hooks",
1919
"format": "prettier --write '**/*.{ts,tsx,yaml,yml,json,md,mdx,js,cjs,mjs,css}'",
20-
"lint": "eslint .",
20+
"lint": "eslint . && stylelint '**/*.{css,scss}'",
2121
"test": "nx run-many --targets=test:unit,test:compile",
2222
"test:browser": "nx run-many --targets=test:browser,test:e2e,test:visual",
2323
"test:browser:prepare": "pnpx playwright install --with-deps firefox webkit",
@@ -58,6 +58,10 @@
5858
"prettier-plugin-sort-json": "^4.2.0",
5959
"react-docgen-typescript": "^2.4.0",
6060
"simple-git-hooks": "^2.13.1",
61+
"stylelint": "^17.0.0",
62+
"stylelint-config-recommended-scss": "^17.0.0",
63+
"stylelint-config-standard": "^40.0.0",
64+
"stylelint-scss": "^7.0.0",
6165
"tsx": "^4.21.0",
6266
"typescript": "^5.9.3",
6367
"typescript-eslint": "^8.53.1",

packages/components/src/components/AccentBox/AccentBox.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
@mixin status($color) {
2323
&.#{$color} {
2424
background: var(--accent-box--background-color-#{$color});
25+
2526
> svg {
2627
color: var(--accent-box--icon-color-#{$color});
2728
}

0 commit comments

Comments
 (0)