Skip to content

Commit

Permalink
Added quick-lint-js
Browse files Browse the repository at this point in the history
  • Loading branch information
viktor-podzigun committed Jan 5, 2024
1 parent f07c939 commit 7f4c31a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
npm i
npm run formatCheck --workspaces
npx tsc
npx quick-lint-js ./ui/**/*.mjs ./ui/**/*.ts
NODE_V8_COVERAGE=coverage0 npx c8 -r lcovonly --all --src ./ui/src node --experimental-test-coverage ./ui/test/all.mjs
if: ${{ env.TAG_NAME == '' }}

Expand Down
3 changes: 2 additions & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"description": "Terminal UI React.js components library",
"scripts": {
"test": "tsc && bun test && node ./test/all.mjs",
"test": "tsc && quick-lint-js **/*.mjs **/*.ts && bun test && node ./test/all.mjs",
"format": "prettier **/*.mjs **/*.ts --write",
"formatCheck": "prettier **/*.mjs **/*.ts --check"
},
Expand Down Expand Up @@ -48,6 +48,7 @@
"c8": "^7.13.0",
"mock-fn": "^1.0.0",
"prettier": "^2.8.8",
"quick-lint-js": "^3.0.0",
"react-assert": "^1.0.3",
"react-test-renderer": "^17.0.1",
"typescript": "^4.9.5"
Expand Down
2 changes: 1 addition & 1 deletion ui/src/Button.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export interface ButtonProps {
readonly top: number;
readonly label: string;
readonly style: Widgets.Types.TStyle;
readonly onPress(): void;
onPress(): void;
}
2 changes: 1 addition & 1 deletion ui/src/ButtonsPanel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Widgets } from "blessed";

export interface ButtonsPanelAction {
readonly label: string;
readonly onAction(): void;
onAction(): void;
}

export interface ButtonsPanelProps {
Expand Down
8 changes: 4 additions & 4 deletions ui/src/UiString.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export interface UiString {
readonly strWidth(): number;
readonly toString(): string;
readonly slice(from: number, until: number): string;
readonly ensureWidth(width: number, padCh: string): string;
strWidth(): number;
toString(): string;
slice(from: number, until: number): string;
ensureWidth(width: number, padCh: string): string;
}
2 changes: 1 addition & 1 deletion ui/src/WithSize.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface WithSizeProps {
readonly render(width: number, height: number): React.ReactElement | null;
render(width: number, height: number): React.ReactElement | null;
}

0 comments on commit 7f4c31a

Please sign in to comment.