chore: fix biome warnings/errors (#26295)

* Fix icon-names

* make all errors into warns

* Minimal fix to mock
This commit is contained in:
Volnei Munhoz authored and GitHub committed 2025-12-30 11:46:26 +00:00
1 parent e4753778fe
commit c52eff65a2
14 files changed
+246 -217

No files matched your search

+3 -2
View File
@@ -9,8 +9,8 @@
"./hooks/*": "./src/hooks/*.ts"
},
"scripts": {
"lint": "biome lint .",
"lint:fix": "biome lint --write .",
"lint": "biome lint src",
"lint:fix": "biome lint --write src",
"type-check": "tsc --pretty --noEmit",
"type-check:ci": "tsc-absolute --pretty --noEmit",
"registry:pull": "ts-node ../../scripts/pull-coss-ui-components.ts"
@@ -27,6 +27,7 @@
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"@biomejs/biome": "2.3.10",
"ts-node": "10.9.2",
"tsc-absolute": "1.0.0",
"typescript": "5.9.0-beta"
+1
View File
@@ -41,6 +41,7 @@
"dist"
],
"devDependencies": {
"@biomejs/biome": "2.3.10",
"@playwright/test": "1.57.0",
"@tailwindcss/cli": "4.1.16",
"@tailwindcss/postcss": "4.1.15",
+1
View File
@@ -30,6 +30,7 @@
"uuid": "8.3.2"
},
"devDependencies": {
"@biomejs/biome": "2.3.10",
"@calcom/tsconfig": "workspace:*",
"@calcom/types": "workspace:*",
"@faker-js/faker": "7.6.0",
@@ -7,7 +7,6 @@
"dev": "PORT=4321 next dev",
"build": "next build",
"start": "next start",
"lint": "biome lint .",
"test:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui"
},
+1
View File
@@ -30,6 +30,7 @@
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"@biomejs/biome": "2.3.10",
"@tanstack/react-query": "5.17.19",
"@types/cookie": "0.6.0",
"@types/uuid": "8.3.4",
+155 -155
View File
@@ -2,158 +2,158 @@
export type IconName =
| "activity"
| "arrow-down"
| "arrow-left"
| "arrow-right"
| "arrow-up-right"
| "arrow-up"
| "asterisk"
| "at-sign"
| "atom"
| "badge-check"
| "ban"
| "bell"
| "binary"
| "blocks"
| "bold"
| "book-open-check"
| "book-open"
| "book-user"
| "book"
| "bookmark"
| "building"
| "calendar-check-2"
| "calendar-days"
| "calendar-heart"
| "calendar-range"
| "calendar-search"
| "calendar-x-2"
| "calendar"
| "chart-bar"
| "chart-line"
| "check-check"
| "check"
| "chevron-down"
| "chevron-left"
| "chevron-right"
| "chevron-up"
| "chevrons-down-up"
| "chevrons-left"
| "chevrons-right"
| "chevrons-up-down"
| "circle-alert"
| "circle-arrow-up"
| "circle-check-big"
| "circle-check"
| "circle-help"
| "circle-plus"
| "circle-x"
| "circle"
| "clipboard-check"
| "clipboard"
| "clock"
| "code"
| "columns-3"
| "command"
| "contact"
| "copy"
| "corner-down-left"
| "corner-down-right"
| "credit-card"
| "disc"
| "dot"
| "download"
| "ellipsis-vertical"
| "ellipsis"
| "external-link"
| "eye-off"
| "eye"
| "file-down"
| "file-text"
| "file"
| "filter"
| "fingerprint"
| "flag"
| "folder"
| "gift"
| "git-merge"
| "github"
| "globe"
| "grid-3x3"
| "handshake"
| "info"
| "italic"
| "key"
| "layers"
| "layout-dashboard"
| "link-2"
| "link"
| "list-filter"
| "loader"
| "lock-open"
| "lock"
| "log-out"
| "mail-open"
| "mail"
| "map-pin"
| "map"
| "menu"
| "message-circle"
| "messages-square"
| "mic-off"
| "mic"
| "monitor"
| "moon"
| "paintbrush"
| "paperclip"
| "pause"
| "pencil"
| "phone-call"
| "phone-incoming"
| "phone-off"
| "phone-outgoing"
| "phone"
| "play"
| "plus"
| "refresh-ccw"
| "refresh-cw"
| "repeat"
| "rocket"
| "rotate-ccw"
| "rotate-cw"
| "search"
| "send"
| "settings"
| "share-2"
| "shield-check"
| "shield"
| "shuffle"
| "sliders-horizontal"
| "sliders-vertical"
| "smartphone"
| "sparkles"
| "split"
| "square-check"
| "square-pen"
| "star"
| "sun"
| "sunrise"
| "sunset"
| "tags"
| "terminal"
| "trash-2"
| "trash"
| "trello"
| "triangle-alert"
| "upload"
| "user-check"
| "user-plus"
| "user-x"
| "user"
| "users"
| "venetian-mask"
| "video"
| "waypoints"
| "webhook"
| "x"
| "zap";
| "arrow-down"
| "arrow-left"
| "arrow-right"
| "arrow-up-right"
| "arrow-up"
| "asterisk"
| "at-sign"
| "atom"
| "badge-check"
| "ban"
| "bell"
| "binary"
| "blocks"
| "bold"
| "book-open-check"
| "book-open"
| "book-user"
| "book"
| "bookmark"
| "building"
| "calendar-check-2"
| "calendar-days"
| "calendar-heart"
| "calendar-range"
| "calendar-search"
| "calendar-x-2"
| "calendar"
| "chart-bar"
| "chart-line"
| "check-check"
| "check"
| "chevron-down"
| "chevron-left"
| "chevron-right"
| "chevron-up"
| "chevrons-down-up"
| "chevrons-left"
| "chevrons-right"
| "chevrons-up-down"
| "circle-alert"
| "circle-arrow-up"
| "circle-check-big"
| "circle-check"
| "circle-help"
| "circle-plus"
| "circle-x"
| "circle"
| "clipboard-check"
| "clipboard"
| "clock"
| "code"
| "columns-3"
| "command"
| "contact"
| "copy"
| "corner-down-left"
| "corner-down-right"
| "credit-card"
| "disc"
| "dot"
| "download"
| "ellipsis-vertical"
| "ellipsis"
| "external-link"
| "eye-off"
| "eye"
| "file-down"
| "file-text"
| "file"
| "filter"
| "fingerprint"
| "flag"
| "folder"
| "gift"
| "git-merge"
| "github"
| "globe"
| "grid-3x3"
| "handshake"
| "info"
| "italic"
| "key"
| "layers"
| "layout-dashboard"
| "link-2"
| "link"
| "list-filter"
| "loader"
| "lock-open"
| "lock"
| "log-out"
| "mail-open"
| "mail"
| "map-pin"
| "map"
| "menu"
| "message-circle"
| "messages-square"
| "mic-off"
| "mic"
| "monitor"
| "moon"
| "paintbrush"
| "paperclip"
| "pause"
| "pencil"
| "phone-call"
| "phone-incoming"
| "phone-off"
| "phone-outgoing"
| "phone"
| "play"
| "plus"
| "refresh-ccw"
| "refresh-cw"
| "repeat"
| "rocket"
| "rotate-ccw"
| "rotate-cw"
| "search"
| "send"
| "settings"
| "share-2"
| "shield-check"
| "shield"
| "shuffle"
| "sliders-horizontal"
| "sliders-vertical"
| "smartphone"
| "sparkles"
| "split"
| "square-check"
| "square-pen"
| "star"
| "sun"
| "sunrise"
| "sunset"
| "tags"
| "terminal"
| "trash-2"
| "trash"
| "trello"
| "triangle-alert"
| "upload"
| "user-check"
| "user-plus"
| "user-x"
| "user"
| "users"
| "venetian-mask"
| "video"
| "waypoints"
| "webhook"
| "x"
| "zap";
+20 -7
View File
@@ -32,13 +32,21 @@ async function generateIconFiles() {
const spriteFilepath = path.join(outputDir, "sprite.svg");
const typeOutputFilepath = path.join(typesDir, "icon-names.ts");
const currentSprite = await fsExtra.readFile(spriteFilepath, "utf8").catch(() => "");
const currentTypes = await fsExtra.readFile(typeOutputFilepath, "utf8").catch(() => "");
const currentSprite = await fsExtra
.readFile(spriteFilepath, "utf8")
.catch(() => "");
const currentTypes = await fsExtra
.readFile(typeOutputFilepath, "utf8")
.catch(() => "");
const iconNames = files.map((file) => iconName(file));
const spriteUpToDate = iconNames.every((name) => currentSprite.includes(`id=${name}`));
const typesUpToDate = iconNames.every((name) => currentTypes.includes(`"${name}"`));
const spriteUpToDate = iconNames.every((name) =>
currentSprite.includes(`id=${name}`)
);
const typesUpToDate = iconNames.every((name) =>
currentTypes.includes(`"${name}"`)
);
if (spriteUpToDate && typesUpToDate) {
logVerbose(`Icons are up to date`);
@@ -63,9 +71,12 @@ async function generateIconFiles() {
const typeOutputContent = `// This file is generated by yarn run build:icons
export type IconName =
\t| ${stringifiedIconNames.join("\n\t| ")};
\t| ${stringifiedIconNames.join("\n | ")};
`;
const typesChanged = await writeIfChanged(typeOutputFilepath, typeOutputContent);
const typesChanged = await writeIfChanged(
typeOutputFilepath,
typeOutputContent
);
logVerbose(`Manifest saved to ${path.relative(cwd, typeOutputFilepath)}`);
@@ -119,7 +130,9 @@ async function generateSvgSprite({ files, inputDir, outputPath }) {
}
async function writeIfChanged(filepath, newContent) {
const currentContent = await fsExtra.readFile(filepath, "utf8").catch(() => "");
const currentContent = await fsExtra
.readFile(filepath, "utf8")
.catch(() => "");
if (currentContent === newContent) return false;
await fsExtra.writeFile(filepath, newContent, "utf8");
await $`node ${biomeBin} format --write ${filepath}`;