Skip to content

Commit 997ddb8

Browse files
committed
fix(web): clear main branch lint warnings
1 parent 3d42966 commit 997ddb8

6 files changed

Lines changed: 21 additions & 20 deletions

File tree

‎apps/web/src/components/ChatMarkdown.tsx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,9 @@ function ChatMarkdown({
13631363
},
13641364
[createAssetUrl, openPreview, preparedConnection, threadRef],
13651365
);
1366+
/* eslint-disable react/no-unstable-nested-components -- ReactMarkdown requires component
1367+
* renderers that close over this message's metadata. useMemo keeps them stable until that
1368+
* metadata changes. */
13661369
const markdownComponents = useMemo<Components>(() => {
13671370
const fileLinkChip = (
13681371
fileLinkMeta: MarkdownFileLinkMeta,
@@ -1593,6 +1596,7 @@ function ChatMarkdown({
15931596
text,
15941597
threadRef,
15951598
]);
1599+
/* eslint-enable react/no-unstable-nested-components */
15961600

15971601
return (
15981602
<div

‎apps/web/src/components/CommandPalette.tsx‎

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,20 @@ import {
138138
buildSidebarProjectPickerEntries,
139139
buildSidebarProjectSnapshots,
140140
} from "../sidebarProjectGrouping";
141+
import type { Project } from "../types";
141142

142143
const EMPTY_BROWSE_ENTRIES: FilesystemBrowseResult["entries"] = [];
143144

145+
function projectFavicon(project: Project) {
146+
return (
147+
<ProjectFavicon
148+
environmentId={project.environmentId}
149+
cwd={project.workspaceRoot}
150+
className={ITEM_ICON_CLASS}
151+
/>
152+
);
153+
}
154+
144155
function getLocalFileManagerName(platform: string): string {
145156
if (isMacPlatform(platform)) {
146157
return "Finder";
@@ -924,13 +935,7 @@ function OpenCommandPaletteDialog(props: {
924935
group?.memberProjects.flatMap((member) => [member.title, member.workspaceRoot]) ?? []
925936
);
926937
},
927-
icon: (project) => (
928-
<ProjectFavicon
929-
environmentId={project.environmentId}
930-
cwd={project.workspaceRoot}
931-
className={ITEM_ICON_CLASS}
932-
/>
933-
),
938+
icon: projectFavicon,
934939
runProject: openProjectFromSearch,
935940
}),
936941
[openProjectFromSearch, pickerProjects, projectGroupByTargetKey],
@@ -948,13 +953,7 @@ function OpenCommandPaletteDialog(props: {
948953
group?.memberProjects.flatMap((member) => [member.title, member.workspaceRoot]) ?? []
949954
);
950955
},
951-
icon: (project) => (
952-
<ProjectFavicon
953-
environmentId={project.environmentId}
954-
cwd={project.workspaceRoot}
955-
className={ITEM_ICON_CLASS}
956-
/>
957-
),
956+
icon: projectFavicon,
958957
runProject: async (project) => {
959958
const group = projectGroupByTargetKey.get(`${project.environmentId}:${project.id}`);
960959
const contextualRefBelongsToGroup =

‎apps/web/src/components/settings/FontFamilyPicker.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ export function FontFamilyPicker({
129129
if (initialOpen) setOpen(true);
130130
// The prop is only meaningful at mount - the control just swapped in
131131
// under an active focus - so later changes are deliberately ignored.
132-
// eslint-disable-next-line react-hooks/exhaustive-deps
133132
}, []);
134133
const listRef = useRef<LegendListRef | null>(null);
135134
const enumeration = useFontEnumeration();

‎apps/web/src/components/settings/SettingsFontPreviews.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ export function CodeFontPreview() {
113113
if (htmlByFile === null) return null;
114114
return (
115115
<div className="mt-1 mb-2 space-y-2">
116-
{htmlByFile.map((html, index) => (
117-
<StaticDiffHtml key={index} html={html} />
116+
{htmlByFile.map((html) => (
117+
<StaticDiffHtml key={html} html={html} />
118118
))}
119119
</div>
120120
);

‎apps/web/src/components/settings/SettingsPanels.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ import {
116116
isMonospaceFamily,
117117
resolveDefaultFamilyLabel,
118118
} from "../../appearanceFonts";
119-
import { DEFAULT_TERMINAL_FONT_FAMILY } from "~/terminal/ghostty/surface";
120119
import { CodeFontPreview, PromptFontPreview, TerminalFontPreview } from "./SettingsFontPreviews";
121120
import { discoverInstalledFonts, FontFamilyPicker, useFontEnumeration } from "./FontFamilyPicker";
122121
import {

‎apps/web/src/components/sidebar/SidebarUpdatePill.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ function SidebarUpdateReleaseNotesTooltip({
4444
{index === 0 ? "What's changed" : `Changes in ${releaseNote.version}`}
4545
</h3>
4646
<ul className="mt-2 space-y-1.5 pl-4 text-xs leading-5 text-popover-foreground/90">
47-
{releaseNote.items.map((item, itemIndex) => (
48-
<li className="list-disc break-words" key={`${releaseNote.version}-${itemIndex}`}>
47+
{releaseNote.items.map((item) => (
48+
<li className="list-disc break-words" key={`${releaseNote.version}-${item}`}>
4949
{item}
5050
</li>
5151
))}

0 commit comments

Comments
 (0)