Skip to content

Commit 1855396

Browse files
committed
Prettify scss
1 parent 9ee104c commit 1855396

15 files changed

Lines changed: 1331 additions & 1601 deletions

.github/workflows/master.yml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,12 @@ jobs:
223223
run: pnpm install --frozen-lockfile
224224
working-directory: ./apps/codebattle
225225

226-
- name: Oxlint
226+
- name: Frontend lint (JS + SCSS)
227227
run: pnpm run lint
228228
working-directory: ./apps/codebattle
229229

230-
- name: Oxfmt check
231-
run: pnpm format:check
230+
- name: Frontend format check (JS + SCSS)
231+
run: pnpm run format:check
232232
working-directory: ./apps/codebattle
233233

234234
- name: Run jest
@@ -277,37 +277,43 @@ jobs:
277277
const deadline = Date.now() + 45 * 60 * 1000;
278278
279279
while (true) {
280-
const jobs = await github.paginate(
281-
github.rest.actions.listJobsForWorkflowRun,
280+
const checkRuns = await github.paginate(
281+
github.rest.checks.listForRef,
282282
{
283283
owner: context.repo.owner,
284284
repo: context.repo.repo,
285-
run_id: context.runId,
285+
ref: context.sha,
286286
per_page: 100,
287287
},
288-
response => response.data.jobs,
288+
response => response.data.check_runs,
289289
);
290290
291-
const safeJobs = (jobs || []).filter(job => job && typeof job.name === "string");
292-
const byName = new Map(safeJobs.map(job => [job.name, job]));
291+
const safeRuns = (checkRuns || []).filter(run => run && typeof run.name === "string");
292+
const byName = new Map();
293+
for (const run of safeRuns) {
294+
const existing = byName.get(run.name);
295+
if (!existing || (run.id ?? 0) > (existing.id ?? 0)) {
296+
byName.set(run.name, run);
297+
}
298+
}
293299
const pending = [];
294300
const failed = [];
295301
296302
for (const name of required) {
297-
const job = byName.get(name);
303+
const run = byName.get(name);
298304
299-
if (!job || job.status !== "completed") {
305+
if (!run || run.status !== "completed") {
300306
pending.push(name);
301307
continue;
302308
}
303309
304-
if (job.conclusion !== "success") {
305-
failed.push(`${name}:${job.conclusion}`);
310+
if (run.conclusion !== "success") {
311+
failed.push(`${name}:${run.conclusion}`);
306312
}
307313
}
308314
309315
core.info(
310-
`jobs_total=${(jobs || []).length}, jobs_named=${safeJobs.length}, pending=[${pending.join(", ")}], failed=[${failed.join(", ")}]`,
316+
`checks_total=${(checkRuns || []).length}, checks_named=${safeRuns.length}, pending=[${pending.join(", ")}], failed=[${failed.join(", ")}]`,
311317
);
312318
313319
if (failed.length > 0) {

apps/codebattle/.stylelintrc.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"customSyntax": "postcss-scss",
3+
"rules": {
4+
"at-rule-no-unknown": null,
5+
"declaration-block-no-duplicate-properties": [
6+
true,
7+
{
8+
"ignore": [
9+
"consecutive-duplicates-with-different-values"
10+
]
11+
}
12+
],
13+
"no-duplicate-selectors": true
14+
}
15+
}
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
1-
@import url("https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;500;600;800&display=swap");
1+
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;500;600;800&display=swap');
22
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');
33

44
@font-face {
5-
font-family: 'pixy';
6-
src: url('../static/fonts/pixy.otf'); /* IE9 Compat Modes */
7-
src: url('../static/fonts/pixy.ttf') format('truetype'), /* Safari, Android, iOS */
8-
url('../static/fonts/pixy.woff') format('woff'); /* Modern Browsers */
5+
font-family: 'pixy';
6+
src: url('../static/fonts/pixy.otf'); /* IE9 Compat Modes */
7+
src:
8+
url('../static/fonts/pixy.ttf') format('truetype'),
9+
/* Safari, Android, iOS */ url('../static/fonts/pixy.woff') format('woff'); /* Modern Browsers */
910
}
1011

1112
@font-face {
1213
font-family: 'IBM Plex Mono';
1314
font-style: normal;
1415
font-weight: 400;
15-
src: url(https://fonts.gstatic.com/s/ibmplexmono/v19/-F63fjptAgt5VM-kVkqdyU8n1i8q131nj-o.woff2) format('woff2');
16-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
16+
src: url(https://fonts.gstatic.com/s/ibmplexmono/v19/-F63fjptAgt5VM-kVkqdyU8n1i8q131nj-o.woff2)
17+
format('woff2');
18+
unicode-range:
19+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
20+
U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
21+
U+2212, U+2215, U+FEFF, U+FFFD;
1722
}
1823

1924
@font-face {
20-
font-family: 'cb-display-bold';
21-
src: url('../static/fonts/CBDisplayBold.ttf');
25+
font-family: 'cb-display-bold';
26+
src: url('../static/fonts/CBDisplayBold.ttf');
2227
}

apps/codebattle/assets/css/_katex-fonts.scss

Lines changed: 80 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -5,178 +5,198 @@
55
font-family: KaTeX_AMS;
66
font-style: normal;
77
font-weight: 400;
8-
src: url("/fonts/katex/KaTeX_AMS-Regular.woff2") format("woff2"),
9-
url("/fonts/katex/KaTeX_AMS-Regular.woff") format("woff"),
10-
url("/fonts/katex/KaTeX_AMS-Regular.ttf") format("truetype");
8+
src:
9+
url('/fonts/katex/KaTeX_AMS-Regular.woff2') format('woff2'),
10+
url('/fonts/katex/KaTeX_AMS-Regular.woff') format('woff'),
11+
url('/fonts/katex/KaTeX_AMS-Regular.ttf') format('truetype');
1112
}
1213

1314
@font-face {
1415
font-family: KaTeX_Caligraphic;
1516
font-style: normal;
1617
font-weight: 700;
17-
src: url("/fonts/katex/KaTeX_Caligraphic-Bold.woff2") format("woff2"),
18-
url("/fonts/katex/KaTeX_Caligraphic-Bold.woff") format("woff"),
19-
url("/fonts/katex/KaTeX_Caligraphic-Bold.ttf") format("truetype");
18+
src:
19+
url('/fonts/katex/KaTeX_Caligraphic-Bold.woff2') format('woff2'),
20+
url('/fonts/katex/KaTeX_Caligraphic-Bold.woff') format('woff'),
21+
url('/fonts/katex/KaTeX_Caligraphic-Bold.ttf') format('truetype');
2022
}
2123

2224
@font-face {
2325
font-family: KaTeX_Caligraphic;
2426
font-style: normal;
2527
font-weight: 400;
26-
src: url("/fonts/katex/KaTeX_Caligraphic-Regular.woff2") format("woff2"),
27-
url("/fonts/katex/KaTeX_Caligraphic-Regular.woff") format("woff"),
28-
url("/fonts/katex/KaTeX_Caligraphic-Regular.ttf") format("truetype");
28+
src:
29+
url('/fonts/katex/KaTeX_Caligraphic-Regular.woff2') format('woff2'),
30+
url('/fonts/katex/KaTeX_Caligraphic-Regular.woff') format('woff'),
31+
url('/fonts/katex/KaTeX_Caligraphic-Regular.ttf') format('truetype');
2932
}
3033

3134
@font-face {
3235
font-family: KaTeX_Fraktur;
3336
font-style: normal;
3437
font-weight: 700;
35-
src: url("/fonts/katex/KaTeX_Fraktur-Bold.woff2") format("woff2"),
36-
url("/fonts/katex/KaTeX_Fraktur-Bold.woff") format("woff"),
37-
url("/fonts/katex/KaTeX_Fraktur-Bold.ttf") format("truetype");
38+
src:
39+
url('/fonts/katex/KaTeX_Fraktur-Bold.woff2') format('woff2'),
40+
url('/fonts/katex/KaTeX_Fraktur-Bold.woff') format('woff'),
41+
url('/fonts/katex/KaTeX_Fraktur-Bold.ttf') format('truetype');
3842
}
3943

4044
@font-face {
4145
font-family: KaTeX_Fraktur;
4246
font-style: normal;
4347
font-weight: 400;
44-
src: url("/fonts/katex/KaTeX_Fraktur-Regular.woff2") format("woff2"),
45-
url("/fonts/katex/KaTeX_Fraktur-Regular.woff") format("woff"),
46-
url("/fonts/katex/KaTeX_Fraktur-Regular.ttf") format("truetype");
48+
src:
49+
url('/fonts/katex/KaTeX_Fraktur-Regular.woff2') format('woff2'),
50+
url('/fonts/katex/KaTeX_Fraktur-Regular.woff') format('woff'),
51+
url('/fonts/katex/KaTeX_Fraktur-Regular.ttf') format('truetype');
4752
}
4853

4954
@font-face {
5055
font-family: KaTeX_Main;
5156
font-style: normal;
5257
font-weight: 700;
53-
src: url("/fonts/katex/KaTeX_Main-Bold.woff2") format("woff2"),
54-
url("/fonts/katex/KaTeX_Main-Bold.woff") format("woff"),
55-
url("/fonts/katex/KaTeX_Main-Bold.ttf") format("truetype");
58+
src:
59+
url('/fonts/katex/KaTeX_Main-Bold.woff2') format('woff2'),
60+
url('/fonts/katex/KaTeX_Main-Bold.woff') format('woff'),
61+
url('/fonts/katex/KaTeX_Main-Bold.ttf') format('truetype');
5662
}
5763

5864
@font-face {
5965
font-family: KaTeX_Main;
6066
font-style: italic;
6167
font-weight: 700;
62-
src: url("/fonts/katex/KaTeX_Main-BoldItalic.woff2") format("woff2"),
63-
url("/fonts/katex/KaTeX_Main-BoldItalic.woff") format("woff"),
64-
url("/fonts/katex/KaTeX_Main-BoldItalic.ttf") format("truetype");
68+
src:
69+
url('/fonts/katex/KaTeX_Main-BoldItalic.woff2') format('woff2'),
70+
url('/fonts/katex/KaTeX_Main-BoldItalic.woff') format('woff'),
71+
url('/fonts/katex/KaTeX_Main-BoldItalic.ttf') format('truetype');
6572
}
6673

6774
@font-face {
6875
font-family: KaTeX_Main;
6976
font-style: italic;
7077
font-weight: 400;
71-
src: url("/fonts/katex/KaTeX_Main-Italic.woff2") format("woff2"),
72-
url("/fonts/katex/KaTeX_Main-Italic.woff") format("woff"),
73-
url("/fonts/katex/KaTeX_Main-Italic.ttf") format("truetype");
78+
src:
79+
url('/fonts/katex/KaTeX_Main-Italic.woff2') format('woff2'),
80+
url('/fonts/katex/KaTeX_Main-Italic.woff') format('woff'),
81+
url('/fonts/katex/KaTeX_Main-Italic.ttf') format('truetype');
7482
}
7583

7684
@font-face {
7785
font-family: KaTeX_Main;
7886
font-style: normal;
7987
font-weight: 400;
80-
src: url("/fonts/katex/KaTeX_Main-Regular.woff2") format("woff2"),
81-
url("/fonts/katex/KaTeX_Main-Regular.woff") format("woff"),
82-
url("/fonts/katex/KaTeX_Main-Regular.ttf") format("truetype");
88+
src:
89+
url('/fonts/katex/KaTeX_Main-Regular.woff2') format('woff2'),
90+
url('/fonts/katex/KaTeX_Main-Regular.woff') format('woff'),
91+
url('/fonts/katex/KaTeX_Main-Regular.ttf') format('truetype');
8392
}
8493

8594
@font-face {
8695
font-family: KaTeX_Math;
8796
font-style: italic;
8897
font-weight: 700;
89-
src: url("/fonts/katex/KaTeX_Math-BoldItalic.woff2") format("woff2"),
90-
url("/fonts/katex/KaTeX_Math-BoldItalic.woff") format("woff"),
91-
url("/fonts/katex/KaTeX_Math-BoldItalic.ttf") format("truetype");
98+
src:
99+
url('/fonts/katex/KaTeX_Math-BoldItalic.woff2') format('woff2'),
100+
url('/fonts/katex/KaTeX_Math-BoldItalic.woff') format('woff'),
101+
url('/fonts/katex/KaTeX_Math-BoldItalic.ttf') format('truetype');
92102
}
93103

94104
@font-face {
95105
font-family: KaTeX_Math;
96106
font-style: italic;
97107
font-weight: 400;
98-
src: url("/fonts/katex/KaTeX_Math-Italic.woff2") format("woff2"),
99-
url("/fonts/katex/KaTeX_Math-Italic.woff") format("woff"),
100-
url("/fonts/katex/KaTeX_Math-Italic.ttf") format("truetype");
108+
src:
109+
url('/fonts/katex/KaTeX_Math-Italic.woff2') format('woff2'),
110+
url('/fonts/katex/KaTeX_Math-Italic.woff') format('woff'),
111+
url('/fonts/katex/KaTeX_Math-Italic.ttf') format('truetype');
101112
}
102113

103114
@font-face {
104115
font-family: KaTeX_SansSerif;
105116
font-style: normal;
106117
font-weight: 700;
107-
src: url("/fonts/katex/KaTeX_SansSerif-Bold.woff2") format("woff2"),
108-
url("/fonts/katex/KaTeX_SansSerif-Bold.woff") format("woff"),
109-
url("/fonts/katex/KaTeX_SansSerif-Bold.ttf") format("truetype");
118+
src:
119+
url('/fonts/katex/KaTeX_SansSerif-Bold.woff2') format('woff2'),
120+
url('/fonts/katex/KaTeX_SansSerif-Bold.woff') format('woff'),
121+
url('/fonts/katex/KaTeX_SansSerif-Bold.ttf') format('truetype');
110122
}
111123

112124
@font-face {
113125
font-family: KaTeX_SansSerif;
114126
font-style: italic;
115127
font-weight: 400;
116-
src: url("/fonts/katex/KaTeX_SansSerif-Italic.woff2") format("woff2"),
117-
url("/fonts/katex/KaTeX_SansSerif-Italic.woff") format("woff"),
118-
url("/fonts/katex/KaTeX_SansSerif-Italic.ttf") format("truetype");
128+
src:
129+
url('/fonts/katex/KaTeX_SansSerif-Italic.woff2') format('woff2'),
130+
url('/fonts/katex/KaTeX_SansSerif-Italic.woff') format('woff'),
131+
url('/fonts/katex/KaTeX_SansSerif-Italic.ttf') format('truetype');
119132
}
120133

121134
@font-face {
122135
font-family: KaTeX_SansSerif;
123136
font-style: normal;
124137
font-weight: 400;
125-
src: url("/fonts/katex/KaTeX_SansSerif-Regular.woff2") format("woff2"),
126-
url("/fonts/katex/KaTeX_SansSerif-Regular.woff") format("woff"),
127-
url("/fonts/katex/KaTeX_SansSerif-Regular.ttf") format("truetype");
138+
src:
139+
url('/fonts/katex/KaTeX_SansSerif-Regular.woff2') format('woff2'),
140+
url('/fonts/katex/KaTeX_SansSerif-Regular.woff') format('woff'),
141+
url('/fonts/katex/KaTeX_SansSerif-Regular.ttf') format('truetype');
128142
}
129143

130144
@font-face {
131145
font-family: KaTeX_Script;
132146
font-style: normal;
133147
font-weight: 400;
134-
src: url("/fonts/katex/KaTeX_Script-Regular.woff2") format("woff2"),
135-
url("/fonts/katex/KaTeX_Script-Regular.woff") format("woff"),
136-
url("/fonts/katex/KaTeX_Script-Regular.ttf") format("truetype");
148+
src:
149+
url('/fonts/katex/KaTeX_Script-Regular.woff2') format('woff2'),
150+
url('/fonts/katex/KaTeX_Script-Regular.woff') format('woff'),
151+
url('/fonts/katex/KaTeX_Script-Regular.ttf') format('truetype');
137152
}
138153

139154
@font-face {
140155
font-family: KaTeX_Size1;
141156
font-style: normal;
142157
font-weight: 400;
143-
src: url("/fonts/katex/KaTeX_Size1-Regular.woff2") format("woff2"),
144-
url("/fonts/katex/KaTeX_Size1-Regular.woff") format("woff"),
145-
url("/fonts/katex/KaTeX_Size1-Regular.ttf") format("truetype");
158+
src:
159+
url('/fonts/katex/KaTeX_Size1-Regular.woff2') format('woff2'),
160+
url('/fonts/katex/KaTeX_Size1-Regular.woff') format('woff'),
161+
url('/fonts/katex/KaTeX_Size1-Regular.ttf') format('truetype');
146162
}
147163

148164
@font-face {
149165
font-family: KaTeX_Size2;
150166
font-style: normal;
151167
font-weight: 400;
152-
src: url("/fonts/katex/KaTeX_Size2-Regular.woff2") format("woff2"),
153-
url("/fonts/katex/KaTeX_Size2-Regular.woff") format("woff"),
154-
url("/fonts/katex/KaTeX_Size2-Regular.ttf") format("truetype");
168+
src:
169+
url('/fonts/katex/KaTeX_Size2-Regular.woff2') format('woff2'),
170+
url('/fonts/katex/KaTeX_Size2-Regular.woff') format('woff'),
171+
url('/fonts/katex/KaTeX_Size2-Regular.ttf') format('truetype');
155172
}
156173

157174
@font-face {
158175
font-family: KaTeX_Size3;
159176
font-style: normal;
160177
font-weight: 400;
161-
src: url("/fonts/katex/KaTeX_Size3-Regular.woff2") format("woff2"),
162-
url("/fonts/katex/KaTeX_Size3-Regular.woff") format("woff"),
163-
url("/fonts/katex/KaTeX_Size3-Regular.ttf") format("truetype");
178+
src:
179+
url('/fonts/katex/KaTeX_Size3-Regular.woff2') format('woff2'),
180+
url('/fonts/katex/KaTeX_Size3-Regular.woff') format('woff'),
181+
url('/fonts/katex/KaTeX_Size3-Regular.ttf') format('truetype');
164182
}
165183

166184
@font-face {
167185
font-family: KaTeX_Size4;
168186
font-style: normal;
169187
font-weight: 400;
170-
src: url("/fonts/katex/KaTeX_Size4-Regular.woff2") format("woff2"),
171-
url("/fonts/katex/KaTeX_Size4-Regular.woff") format("woff"),
172-
url("/fonts/katex/KaTeX_Size4-Regular.ttf") format("truetype");
188+
src:
189+
url('/fonts/katex/KaTeX_Size4-Regular.woff2') format('woff2'),
190+
url('/fonts/katex/KaTeX_Size4-Regular.woff') format('woff'),
191+
url('/fonts/katex/KaTeX_Size4-Regular.ttf') format('truetype');
173192
}
174193

175194
@font-face {
176195
font-family: KaTeX_Typewriter;
177196
font-style: normal;
178197
font-weight: 400;
179-
src: url("/fonts/katex/KaTeX_Typewriter-Regular.woff2") format("woff2"),
180-
url("/fonts/katex/KaTeX_Typewriter-Regular.woff") format("woff"),
181-
url("/fonts/katex/KaTeX_Typewriter-Regular.ttf") format("truetype");
198+
src:
199+
url('/fonts/katex/KaTeX_Typewriter-Regular.woff2') format('woff2'),
200+
url('/fonts/katex/KaTeX_Typewriter-Regular.woff') format('woff'),
201+
url('/fonts/katex/KaTeX_Typewriter-Regular.ttf') format('truetype');
182202
}

apps/codebattle/assets/css/_monaco-fonts.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The font is served from /codicon.ttf in both dev and production
33

44
@font-face {
5-
font-family: "codicon";
5+
font-family: 'codicon';
66
font-display: block;
7-
src: url("/codicon.ttf") format("truetype");
7+
src: url('/codicon.ttf') format('truetype');
88
}

apps/codebattle/assets/css/_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$font-family-base: "Source Code Pro", sans-serif;
1+
$font-family-base: 'Source Code Pro', sans-serif;
22

33
$sm: 575px;
44
$md: 676px;

0 commit comments

Comments
 (0)