chore: Address 11 lint warnings (#13092)

This commit is contained in:
Tom Moor
2026-07-21 23:07:10 -04:00
committed by GitHub
parent 043d2902b0
commit b1d2fb986f
10 changed files with 25 additions and 32 deletions
+1 -1
View File
@@ -213,7 +213,7 @@ function DocumentBreadcrumb(
...(collectionLabel ? [collectionLabel] : []),
...(omitted.length
? [
<Tooltip content={omitted.join(" / ")}>
<Tooltip key="ellipsis" content={omitted.join(" / ")}>
<Ellipsis></Ellipsis>
</Tooltip>,
]
+2 -2
View File
@@ -311,9 +311,9 @@ function Placeholder({
return (
<DelayedMount>
<TBody $height={150}>
{new Array(rows).fill(1).map((_r, row) => (
{Array.from({ length: rows }).map((_r, row) => (
<TR key={row} $columns={gridColumns}>
{new Array(columns).fill(1).map((_c, col) => (
{Array.from({ length: columns }).map((_c, col) => (
<TD key={col}>
<PlaceholderText minWidth={25} maxWidth={75} />
</TD>
+7 -9
View File
@@ -163,15 +163,13 @@ export default function tableColMenuItems(ctx: SelectionContext): MenuItem[] {
<PaletteIcon />
),
children: [
...[
{
name: "toggleColumnBackgroundAndCollapseSelection",
label: t("None"),
icon: <DottedCircleIcon color="transparent" />,
active: () => (hasBackground ? false : true),
attrs: { color: null },
},
],
{
name: "toggleColumnBackgroundAndCollapseSelection",
label: t("None"),
icon: <DottedCircleIcon color="transparent" />,
active: () => (hasBackground ? false : true),
attrs: { color: null },
},
...TableCell.presetColors.map((preset) => ({
name: "toggleColumnBackgroundAndCollapseSelection",
label: preset.name,
+7 -9
View File
@@ -150,15 +150,13 @@ export default function tableRowMenuItems(ctx: SelectionContext): MenuItem[] {
<PaletteIcon />
),
children: [
...[
{
name: "toggleRowBackgroundAndCollapseSelection",
label: t("None"),
icon: <DottedCircleIcon color="transparent" />,
active: () => (hasBackground ? false : true),
attrs: { color: null },
},
],
{
name: "toggleRowBackgroundAndCollapseSelection",
label: t("None"),
icon: <DottedCircleIcon color="transparent" />,
active: () => (hasBackground ? false : true),
attrs: { color: null },
},
...TableCell.presetColors.map((preset) => ({
name: "toggleRowBackgroundAndCollapseSelection",
label: preset.name,
@@ -143,11 +143,9 @@ function PresentationMode({ title, icon, iconColor, data, onClose }: Props) {
const slides = React.useMemo(() => {
const result = splitIntoSlides(strippedData, title, icon, iconColor);
const contentSlides = result.filter((s) => s.type === "content");
const hasContent =
contentSlides.length > 0 &&
contentSlides.some(
(s) => s.type === "content" && !isContentEmpty(s.content)
);
const hasContent = contentSlides.some(
(s) => s.type === "content" && !isContentEmpty(s.content)
);
if (!hasContent) {
return [result[0], { type: "instructions" as const }];
+1 -1
View File
@@ -24,7 +24,7 @@ export default class Queue {
return;
}
this.handler(job, this.done);
this.handler(job, () => this.done());
}
process(handler: (job: unknown, done: () => void) => void) {
+1 -1
View File
@@ -122,7 +122,7 @@ router.post(
where = {
...where,
id: {
...((where.id as object) ?? {}),
...(where.id as object),
[source === "manual" ? Op.notIn : Op.in]: sourceGroupIds,
},
};
+1 -1
View File
@@ -499,7 +499,7 @@ describe("#users.invite", () => {
const user = await buildUser();
const res = await server.post("/api/users.invite", user, {
body: {
invites: new Array(21).fill({
invites: Array.from({ length: 21 }).fill({
email: "test@example.com",
name: "Test",
role: "viewer",
+1 -1
View File
@@ -84,7 +84,7 @@ export class AnchorPlugin extends Plugin {
const anchors = ProsemirrorHelper.getAnchors(state.doc);
return DecorationSet.create(
state.doc,
anchors.map(this.createAnchorDecoration)
anchors.map((anchor) => this.createAnchorDecoration(anchor))
);
}
}
@@ -114,8 +114,7 @@ function getDecorations({
(block.node.textContent.match(/\n/g) || []).length + 1;
const gutterWidth = String(lineCount).length;
const lineCountText = new Array(lineCount)
.fill(0)
const lineCountText = Array.from({ length: lineCount })
.map((_, i) => padStart(`${i + 1}`, gutterWidth, " "))
.join("\n");