Skip to content

Commit fb13a1c

Browse files
Added quick-lint-js (#10)
1 parent f07c939 commit fb13a1c

File tree

11 files changed

+19
-16
lines changed

11 files changed

+19
-16
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
npm i
4646
npm run formatCheck --workspaces
4747
npx tsc
48+
npx quick-lint-js ./ui/**/*.mjs ./ui/**/*.ts
4849
NODE_V8_COVERAGE=coverage0 npx c8 -r lcovonly --all --src ./ui/src node --experimental-test-coverage ./ui/test/all.mjs
4950
if: ${{ env.TAG_NAME == '' }}
5051

ui/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"license": "MIT",
66
"description": "Terminal UI React.js components library",
77
"scripts": {
8+
"lint": "quick-lint-js ./**/*.mjs ./**/*.ts",
89
"test": "tsc && bun test && node ./test/all.mjs",
910
"format": "prettier **/*.mjs **/*.ts --write",
1011
"formatCheck": "prettier **/*.mjs **/*.ts --check"
@@ -48,6 +49,7 @@
4849
"c8": "^7.13.0",
4950
"mock-fn": "^1.0.0",
5051
"prettier": "^2.8.8",
52+
"quick-lint-js": "^3.0.0",
5153
"react-assert": "^1.0.3",
5254
"react-test-renderer": "^17.0.1",
5355
"typescript": "^4.9.5"

ui/src/Button.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ export interface ButtonProps {
77
readonly top: number;
88
readonly label: string;
99
readonly style: Widgets.Types.TStyle;
10-
readonly onPress(): void;
10+
onPress(): void;
1111
}

ui/src/ButtonsPanel.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Widgets } from "blessed";
22

33
export interface ButtonsPanelAction {
44
readonly label: string;
5-
readonly onAction(): void;
5+
onAction(): void;
66
}
77

88
export interface ButtonsPanelProps {

ui/src/UiString.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export interface UiString {
2-
readonly strWidth(): number;
3-
readonly toString(): string;
4-
readonly slice(from: number, until: number): string;
5-
readonly ensureWidth(width: number, padCh: string): string;
2+
strWidth(): number;
3+
toString(): string;
4+
slice(from: number, until: number): string;
5+
ensureWidth(width: number, padCh: string): string;
66
}

ui/src/WithSize.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export interface WithSizeProps {
2-
readonly render(width: number, height: number): React.ReactElement | null;
2+
render(width: number, height: number): React.ReactElement | null;
33
}

ui/src/menu/MenuBar.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ export interface MenuBarItem {
55

66
export interface MenuBarProps {
77
readonly items: MenuBarItem[];
8-
readonly onAction(menuIndex: number, subIndex: number): void;
9-
readonly onClose(): void;
8+
onAction(menuIndex: number, subIndex: number): void;
9+
onClose(): void;
1010
}

ui/src/menu/MenuPopup.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export interface MenuPopupProps {
22
readonly title: string;
33
readonly items: string[];
4-
readonly getLeft(width: number): string;
5-
readonly onSelect(index: number): void;
6-
readonly onClose(): void;
4+
getLeft(width: number): string;
5+
onSelect(index: number): void;
6+
onClose(): void;
77
}

ui/src/menu/SubMenu.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ export interface SubMenuProps {
33
readonly items: string[];
44
readonly top: number;
55
readonly left: number;
6-
readonly onClick(index: number): void;
6+
onClick(index: number): void;
77
}

ui/src/popup/Modal.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ export interface ModalProps {
77
readonly width: number;
88
readonly height: number;
99
readonly style: BlessedStyle;
10-
readonly onCancel(): void;
10+
onCancel(): void;
1111
}

0 commit comments

Comments
 (0)