Skip to content

Commit f26ab6a

Browse files
Remove naming-convention eslint-disable comments from apps/roam (#1064)
- Removed all /* eslint-disable @typescript-eslint/naming-convention */ comments - Removed all // eslint-disable-next-line @typescript-eslint/naming-convention comments - Removed all // eslint-disable-line @typescript-eslint/naming-convention comments - No new lint warnings introduced - relaxed naming rules from ENG-1777 are working correctly Relates to ENG-1779 Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent d14ebe6 commit f26ab6a

48 files changed

Lines changed: 14 additions & 104 deletions

Some content is hidden

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

apps/roam/src/components/CreateRelationDialog.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ export const renderCreateRelationDialog = (
373373
});
374374
} else {
375375
renderOverlay({
376-
// eslint-disable-next-line @typescript-eslint/naming-convention
377376
Overlay: CreateRelationDialog,
378377
props: props as ExtendedCreateRelationDialogProps,
379378
});

apps/roam/src/components/DiscourseNodeSearchMenu.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,7 @@ const NodeSearchMenu = ({
297297
const { ["block-uid"]: blockUid, ["window-id"]: windowId } = useMemo(
298298
() =>
299299
window.roamAlphaAPI.ui.getFocusedBlock() || {
300-
// eslint-disable-next-line @typescript-eslint/naming-convention
301300
"block-uid": "",
302-
// eslint-disable-next-line @typescript-eslint/naming-convention
303301
"window-id": "",
304302
},
305303
[],
@@ -352,9 +350,7 @@ const NodeSearchMenu = ({
352350
if (window.roamAlphaAPI.ui.setBlockFocusAndSelection) {
353351
void window.roamAlphaAPI.ui.setBlockFocusAndSelection({
354352
location: {
355-
// eslint-disable-next-line @typescript-eslint/naming-convention
356353
"block-uid": blockUid,
357-
// eslint-disable-next-line @typescript-eslint/naming-convention
358354
"window-id": windowId,
359355
},
360356
selection: { start: newCursorPosition },

apps/roam/src/components/Export.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ const ExportDialog: ExportDialogComponent = ({
250250
setSelectedPageUid(getPageUidByPageTitle(title));
251251
};
252252

253-
/* eslint-disable @typescript-eslint/naming-convention */
254253
const addToSelectedCanvas = async (pageUid: string) => {
255254
if (typeof results !== "object") return false;
256255

@@ -283,7 +282,6 @@ const ExportDialog: ExportDialogComponent = ({
283282
if (event.shiftKey) {
284283
void window.roamAlphaAPI.ui.rightSidebar.addWindow({
285284
// @ts-expect-error - todo test
286-
// eslint-disable-next-line @typescript-eslint/naming-convention
287285
window: { "block-uid": pageUid, type: "outline" },
288286
});
289287
} else {
@@ -420,7 +418,6 @@ const ExportDialog: ExportDialogComponent = ({
420418
tldraw.schema = tlStore.schema.serialize();
421419
tempTlStoreSnapshot = tlStore.getStoreSnapshot();
422420
}
423-
/* eslint-disable @typescript-eslint/naming-convention */
424421

425422
const tlStoreSnapshot = isTLStore
426423
? (tldraw as TLStoreSnapshot) // isTlStore type checked above
@@ -677,7 +674,6 @@ const ExportDialog: ExportDialogComponent = ({
677674
if (event.shiftKey) {
678675
void window.roamAlphaAPI.ui.rightSidebar.addWindow({
679676
// @ts-expect-error - todo test
680-
// eslint-disable-next-line @typescript-eslint/naming-convention
681677
window: { "block-uid": uid, type: "outline" },
682678
});
683679
} else {

apps/roam/src/components/LeftSidebarCommands.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export const commands: Record<
1717
(onloadArgs: OnloadArgs) => Promise<void>
1818
> = {
1919
/* eslint-disable @typescript-eslint/require-await */
20-
// eslint-disable-next-line @typescript-eslint/naming-convention
2120
"{create node}": async (onloadArgs: OnloadArgs) => {
2221
createDiscourseNodeFromCommand(onloadArgs.extensionAPI);
2322
// typescript-eslint/naming-convention

apps/roam/src/components/LeftSidebarView.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/naming-convention */
21
import React, {
32
useCallback,
43
useEffect,
@@ -119,7 +118,6 @@ const openTarget = async (
119118
if (e.shiftKey) {
120119
await window.roamAlphaAPI.ui.rightSidebar.addWindow({
121120
// @ts-expect-error - todo test
122-
// eslint-disable-next-line @typescript-eslint/naming-convention
123121
window: { type: "outline", "block-uid": targetUid },
124122
});
125123
} else {

apps/roam/src/components/ModifyNodeDialog.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ const ModifyNodeDialog = ({
322322
extensionAPI,
323323
parentUid,
324324
// due to query format
325-
// eslint-disable-next-line @typescript-eslint/naming-convention
326325
inputs: { NODETEXT: content.text, NODEUID: pageUid },
327326
});
328327
const imagePlaceholderUid = results.allProcessedResults[0]?.uid;
@@ -398,7 +397,6 @@ const ModifyNodeDialog = ({
398397
formattedTitle = nodeFormat.replace(
399398
/{([\w\d-]*)}/g,
400399
// unused variable will take _ as name
401-
// eslint-disable-next-line @typescript-eslint/naming-convention
402400
(_, val: string) => {
403401
if (/content/i.test(val)) return content.text.trim();
404402
if (new RegExp(referencedNode.name, "i").test(val))
@@ -460,7 +458,6 @@ const ModifyNodeDialog = ({
460458
await window.roamAlphaAPI.ui.rightSidebar.addWindow({
461459
window: {
462460
// @ts-expect-error TODO: fix this
463-
// eslint-disable-next-line @typescript-eslint/naming-convention
464461
"block-uid": newPageUid,
465462
type: "outline",
466463
},
@@ -492,7 +489,6 @@ const ModifyNodeDialog = ({
492489
if (referencedNode && referencedNodeValue.text) {
493490
updatedContent = nodeFormat
494491
// unused variable will take _ as name
495-
// eslint-disable-next-line @typescript-eslint/naming-convention
496492
.replace(/{([\w\d-]*)}/g, (_, val: string) => {
497493
if (/content/i.test(val)) return content.text.trim();
498494
if (new RegExp(referencedNode.name, "i").test(val))
@@ -643,7 +639,6 @@ const ModifyNodeDialog = ({
643639

644640
export const renderModifyNodeDialog = (props: ModifyNodeDialogProps) =>
645641
renderOverlay({
646-
// eslint-disable-next-line @typescript-eslint/naming-convention
647642
Overlay: ModifyNodeDialog,
648643
props,
649644
});

apps/roam/src/components/VectorDuplicateMatches.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ export const VectorDuplicateMatches = ({
9292
window: {
9393
type: "outline",
9494
// @ts-expect-error - type definition mismatch
95-
// eslint-disable-next-line @typescript-eslint/naming-convention
9695
"block-uid": node.uid,
9796
},
9897
});

apps/roam/src/components/canvas/Clipboard.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ type ClipboardContextValue = {
8484
setShowNodesOnCanvas: (show: boolean) => void;
8585
};
8686

87-
// eslint-disable-next-line @typescript-eslint/naming-convention
8887
const ClipboardContext = createContext<ClipboardContextValue | null>(null);
8988

9089
const CLIPBOARD_PROP_KEY = "pages";
@@ -109,9 +108,7 @@ const getOrCreateClipboardBlock = async (
109108
childBlocksData?.[":block/children"] &&
110109
Array.isArray(childBlocksData[":block/children"])
111110
? (childBlocksData[":block/children"] as Array<{
112-
// eslint-disable-next-line @typescript-eslint/naming-convention
113111
":block/uid": string;
114-
// eslint-disable-next-line @typescript-eslint/naming-convention
115112
":block/string": string;
116113
}>)
117114
: [];

apps/roam/src/components/canvas/CustomDefaultToolbar.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */
22
/* eslint-disable @typescript-eslint/consistent-type-definitions */
3-
/* eslint-disable @typescript-eslint/naming-convention */
43
/* eslint-disable preferArrows/prefer-arrow-functions */
54

65
// from /packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbar.tsx

apps/roam/src/components/canvas/DiscourseNodeUtil.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ export const DEFAULT_STYLE_PROPS = {
7676
};
7777
export const COLOR_ARRAY = Array.from(DefaultColorStyle.values).reverse();
7878
// from @tldraw/editor/editor.css
79-
/* eslint-disable @typescript-eslint/naming-convention */
8079
export const COLOR_PALETTE: Record<string, string> = {
8180
black: "#1d1d1d",
8281
blue: "#4263eb",
@@ -92,7 +91,6 @@ export const COLOR_PALETTE: Record<string, string> = {
9291
white: "#ffffff",
9392
yellow: "#ffc078",
9493
};
95-
/* eslint-disable @typescript-eslint/naming-convention */
9694

9795
const getRelationIds = () =>
9896
new Set(

0 commit comments

Comments
 (0)