Skip to content

Commit a462c59

Browse files
feat(all): add stylelint CSS linter (#140)
1 parent d94349e commit a462c59

File tree

57 files changed

+774
-283
lines changed

Some content is hidden

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

57 files changed

+774
-283
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ jobs:
3434
run: yarn run fmt:check
3535

3636
- name: Run eslint
37-
run: yarn run lint
37+
run: yarn run lint:ts
38+
39+
- name: Run stylelint
40+
run: yarn run lint:css
3841

3942
- name: Build project
4043
run: yarn run build:all

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,8 @@ yarn-error.log
3636
# Eslint
3737
.eslintcache
3838

39+
# stylelint
40+
.stylelintcache
41+
3942
# astro
4043
.astro/

.stylelintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist/
2+
node_modules/
3+
playwright-report/
4+
test-results/

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"dev": "vite --port 5174",
99
"build": "tsc -b && vite build",
1010
"build:all": "yarn build && yarn astro:build",
11-
"lint": "eslint --max-warnings 0 . --cache",
11+
"lint": "yarn run lint:ts && yarn run lint:css",
12+
"lint:ts": "eslint --max-warnings 0 . --cache",
13+
"lint:css": "stylelint '**/*.css' --cache",
1214
"preview": "vite preview",
1315
"deploy": "gh-pages -d dist --nojekyll",
1416
"fmt": "prettier --write -l --cache .",
@@ -86,6 +88,9 @@
8688
"starlight-links-validator": "^0.18.0",
8789
"starlight-llms-txt": "^0.6.0",
8890
"starlight-theme-rapide": "^0.5.1",
91+
"stylelint": "^16.24.0",
92+
"stylelint-config-css-modules": "^4.5.1",
93+
"stylelint-config-standard": "^39.0.0",
8994
"ts-node": "^10.9.1",
9095
"typescript": "~5.8.3",
9196
"typescript-eslint": "^8.30.1",

spec/src/starlight.custom.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
--sl-color-accent-low: #00234c;
99
--sl-color-accent: #0067c9;
1010
--sl-color-accent-high: #a4ccff;
11-
--sl-color-real-white: #ffffff;
12-
--sl-color-white: #ffffff;
11+
--sl-color-real-white: #fff;
12+
--sl-color-white: #fff;
1313
--sl-color-gray-1: #eceef2;
1414
--sl-color-gray-2: #c0c2c7;
1515
--sl-color-gray-3: #888b96;
@@ -34,7 +34,7 @@
3434
--sl-color-gray-5: #c0c2c7;
3535
--sl-color-gray-6: #eceef2;
3636
--sl-color-gray-7: #f5f6f8;
37-
--sl-color-black: #ffffff;
37+
--sl-color-black: #fff;
3838
--tracepage-logo-inner-gradient-start: #0f3ec9;
3939
}
4040

@@ -132,7 +132,7 @@ header.header .site-title {
132132
font-weight: 400;
133133
}
134134

135-
header.header .site-title span:before {
135+
header.header .site-title span::before {
136136
content: "TxTracer";
137137
font-size: var(--sl-text-lg) !important;
138138
color: var(--sl-color-real-white);

src/features/sandbox/ui/abi/ParsedDataView.module.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
}
150150

151151
/* Responsive adjustments */
152-
@media (max-width: 768px) {
152+
@media (width <= 768px) {
153153
.fieldValue {
154154
margin-left: var(--spacing-sm);
155155
width: calc(100% - var(--spacing-sm));
@@ -202,14 +202,14 @@
202202

203203
.diffOldValue .stringValue {
204204
color: var(--color-error-text);
205-
background-color: rgba(220, 38, 38, 0.1);
206-
border-color: rgba(220, 38, 38, 0.3);
205+
background-color: rgb(220 38 38 / 10%);
206+
border-color: rgb(220 38 38 / 30%);
207207
}
208208

209209
.diffNewValue .stringValue {
210210
color: var(--color-success-text);
211-
background-color: rgba(22, 163, 74, 0.1);
212-
border-color: rgba(22, 163, 74, 0.3);
211+
background-color: rgb(22 163 74 / 10%);
212+
border-color: rgb(22 163 74 / 30%);
213213
}
214214

215215
.diffOldValue .numberValue {

src/features/themeSwitcher/ui/ThemeToggleButton.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
margin-left: var(--spacing-sm);
1515
}
1616

17-
@media (max-width: 768px) {
17+
@media (width <= 768px) {
1818
.toggleButtonText {
1919
display: none;
2020
}

src/features/txTrace/ui/StepInstructionBlock.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
box-sizing: border-box;
2727
gap: 8px;
2828
margin-left: var(--spacing-sm);
29-
font-family: var(--font-family-mono), "monospace";
29+
font-family: var(--font-family-mono), monospace;
3030
}
3131

3232
.instructionName {

src/features/txTrace/ui/TransactionDetailsTable.module.css

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
color: var(--table-th-text-color);
4242
}
4343

44-
.sectionTitle {
45-
}
46-
4744
.detailLabel {
4845
display: flex;
4946
align-items: center;
@@ -103,9 +100,6 @@
103100
color: var(--color-text-secondary);
104101
}
105102

106-
.numberValue {
107-
}
108-
109103
.booleanTrue {
110104
font-weight: var(--font-weight-semibold);
111105
color: var(--table-boolean-true-color);
@@ -188,9 +182,6 @@
188182
border-bottom: 1px solid var(--table-border-color);
189183
}
190184

191-
.labeledSectionRow:last-of-type {
192-
}
193-
194185
.labeledSectionTitle {
195186
text-align: left;
196187
font-weight: var(--font-weight-semibold);
@@ -212,7 +203,7 @@
212203
box-sizing: border-box;
213204
}
214205

215-
@media (max-width: 768px) {
206+
@media (width <= 768px) {
216207
.detailRow,
217208
.labeledSectionRow {
218209
flex-direction: column;

0 commit comments

Comments
 (0)