Skip to content

Commit

Permalink
Check for unused imports, parameters, and local variables (#79)
Browse files Browse the repository at this point in the history
Co-authored-by: Christy Presler <[email protected]>
  • Loading branch information
cpresler and cpresler authored Apr 12, 2024
1 parent 9b560bd commit be70433
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"license": "MIT",
"scripts": {
"build": "esbuild widget-src/Widget.tsx --bundle --outfile=dist/code.js --target=es6",
"tsc": "tsc --noEmit -p widget-src",
"tsc": "tsc --noEmit --noUnusedLocals --noUnusedParameters --skipLibCheck -p widget-src",
"watch": "bun run build -- --watch"
}
}
1 change: 0 additions & 1 deletion widget-src/Widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ function Widget() {
description={showDescription}
status={showStatus}
createdDate={createdDate}
setCreatedDate={setCreatedDate}
updatedDate={updatedDate}
setUpdatedDate={setUpdatedDate}
version={version}
Expand Down
2 changes: 1 addition & 1 deletion widget-src/components/ChangeLogList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ChangeLog, ChangeLogState } from '../types/ChangeLog';
import { PADDING } from '../utilities/Styles';
import { ChangeLogRow } from './ChangeLogRow';

const { widget, currentUser } = figma;
const { widget } = figma;
const { AutoLayout, useEffect } = widget;

interface ChangeLogListProps {
Expand Down
2 changes: 1 addition & 1 deletion widget-src/components/ChangeLogRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ChangeLogEditing } from './log/LogEditing';
import { ChangeLogDisplay } from './log/LogDisplay';

const { widget } = figma;
const { AutoLayout, Input, Rectangle, Text } = widget;
const { AutoLayout, Rectangle } = widget;

interface ChangeLogRowProps {
changeLogId: string;
Expand Down
2 changes: 0 additions & 2 deletions widget-src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ interface HeaderProps {
description: boolean;
status: string;
createdDate: number;
setCreatedDate: (updatedDate: number) => void;
updatedDate: number;
setUpdatedDate: (updatedDate: number) => void;
version: string;
Expand All @@ -26,7 +25,6 @@ export const Header = ({
description,
status,
createdDate,
setCreatedDate,
updatedDate,
setUpdatedDate,
version,
Expand Down
2 changes: 1 addition & 1 deletion widget-src/components/log/LinkList.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LinkType } from "../../types/LinkTypes";
import { PADDING, COLOR, GAP } from "../../utilities/Styles";
import { PADDING, GAP } from "../../utilities/Styles";
import { Link } from "./Link";

const { widget} = figma;
Expand Down
1 change: 0 additions & 1 deletion widget-src/components/log/LogEditing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { ChangeLog, ChangeLogState } from '../../types/ChangeLog';
import { COLOR, FONT, GAP, PADDING, SPACE, RADIUS } from '../../utilities/Styles';
import { DateRangeForm } from './DateRangeForm';
import { Button } from '../Button';
import { ActionDeleteIcon } from '../../svgs/ActionDeleteIcon';
import { LinkList } from './LinkList';
import { Type } from './Type';
import { TypeMenu } from './TypeMenu';
Expand Down
4 changes: 2 additions & 2 deletions widget-src/components/log/TypeMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ChangeType, ChangeTypes } from '../../types/ChangeTypes';
import { COLOR, FONT, GAP, PADDING, SPACE, RADIUS } from '../../utilities/Styles';
import { COLOR, FONT, PADDING, RADIUS } from '../../utilities/Styles';
import { Type } from './Type';

const { widget } = figma;
const { AutoLayout, Input, Rectangle, Text } = widget;
const { AutoLayout } = widget;

interface TypeMenuProps {
currentType: ChangeType;
Expand Down

0 comments on commit be70433

Please sign in to comment.