Skip to content

Commit 0afa6a6

Browse files
committed
chore(config): enforce eslint's sort-keys rule so definitions stay alpha sorted
1 parent d6755af commit 0afa6a6

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ module.exports = {
1515
"no-process-env": 0,
1616
"no-process-exit": 0,
1717
"no-console": 0,
18+
"sort-keys": 2,
1819
},
1920
};

scripts/build/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async function buildSvgSetAsync(buildPrefix: OutputType) {
4747
writeJsModule(iconsObj, buildPrefix),
4848
]);
4949

50-
return { obj: iconsObj, count: icons.length };
50+
return { count: icons.length, obj: iconsObj };
5151
}
5252

5353
(async () => {

scripts/build/write-css.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export async function bundleCssIcons() {
88
name: string;
99
css: string | null;
1010
}[] = cssIcons
11-
.map((i) => (typeof i === "string" ? { name: i, css: null } : i))
11+
.map((i) => (typeof i === "string" ? { css: null, name: i } : i))
1212
.sort((a, b) => (a.name > b.name ? 1 : -1));
1313

1414
const allIconSvgStrings = await Promise.all(

scripts/build/write-svg.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,18 @@ export async function processSvgFilesAsync(type: OutputType) {
172172
processed.forEach((i) => {
173173
try {
174174
const optimized = optimize(i, {
175-
multipass: true,
176175
floatPrecision: 2,
176+
multipass: true,
177177
plugins: [
178178
{
179179
name: "preset-default",
180180
params: {
181181
overrides: {
182-
removeViewBox: false,
183182
mergePaths: {
184183
force: true,
185184
noSpaceAfterFlags: true,
186185
},
186+
removeViewBox: false,
187187
},
188188
},
189189
},

scripts/definitions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const cssIcons: (string | { name: string; css: string })[] = [
66
"Code",
77
"Strikethrough",
88
"Link",
9-
{ name: "Quote", css: "width: 17px;" },
9+
{ css: "width: 17px;", name: "Quote" },
1010
"Codeblock",
1111
"Image",
1212
"Table",
@@ -18,9 +18,9 @@ export const cssIcons: (string | { name: string; css: string })[] = [
1818
"Help",
1919
"Play",
2020
"Share",
21-
{ name: "PencilSm", css: "width: 14px;\n height: 14px;" },
22-
{ name: "TrashSm", css: "width: 14px;\n height: 14px;" },
23-
{ name: "Markdown", css: "width: 21px;" },
21+
{ css: "width: 14px;\n height: 14px;", name: "PencilSm" },
22+
{ css: "width: 14px;\n height: 14px;", name: "TrashSm" },
23+
{ css: "width: 21px;", name: "Markdown" },
2424
"Achievements",
2525
"FaceMindBlown",
2626
"Wave",

0 commit comments

Comments
 (0)