Skip to content

Commit c1d2734

Browse files
authored
Prettier (#159)
* Prettier setup * Update builds.service.ts * Update builds.service.ts * react-scripts udpated to 4.0.3
1 parent 8896ebc commit c1d2734

File tree

8 files changed

+11306
-5733
lines changed

8 files changed

+11306
-5733
lines changed

package-lock.json

Lines changed: 11288 additions & 5720 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
"@testing-library/jest-dom": "^5.11.1",
1111
"@testing-library/react": "^10.4.7",
1212
"@testing-library/user-event": "^12.0.11",
13-
"husky": "^4.2.5",
13+
"husky": "^4.3.8",
1414
"konva": "^7.0.3",
15-
"lint-staged": "^10.2.11",
15+
"lint-staged": "^10.5.4",
1616
"material-ui-popup-state": "^1.6.1",
1717
"notistack": "^0.9.17",
18-
"prettier": "^2.0.5",
18+
"prettier": "^2.2.1",
1919
"qs": "^6.9.4",
2020
"react": "^16.13.1",
2121
"react-debounce-input": "^3.2.2",
@@ -24,7 +24,7 @@
2424
"react-konva": "^16.13.0-3",
2525
"react-material-ui-form-validator": "^2.1.1",
2626
"react-router-dom": "^5.2.0",
27-
"react-scripts": "^3.4.3",
27+
"react-scripts": "4.0.3",
2828
"socket.io-client": "^2.3.0",
2929
"typescript": "^3.9.7",
3030
"use-image": "^1.0.6"

src/components/BaseModal.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ export const BaseModal: React.FunctionComponent<IProps> = ({
2525
onSubmit,
2626
onCancel,
2727
}) => {
28-
2928
return (
30-
<Dialog open={open} onClose={onCancel} aria-labelledby="form-dialog-title" fullWidth>
29+
<Dialog
30+
open={open}
31+
onClose={onCancel}
32+
aria-labelledby="form-dialog-title"
33+
fullWidth
34+
>
3135
<DialogTitle id="form-dialog-title">{title}</DialogTitle>
3236
<ValidatorForm onSubmit={onSubmit} instantValidate>
3337
<DialogContent>{content}</DialogContent>

src/components/LoginForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const LoginForm = () => {
6868
required
6969
fullWidth
7070
inputProps={{
71-
onChange: (event:any) =>
71+
onChange: (event: any) =>
7272
setPassword((event.target as HTMLInputElement).value),
7373
"data-testid": "password",
7474
}}

src/pages/ProfilePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ const ProfilePage = () => {
196196
required
197197
fullWidth
198198
inputProps={{
199-
onChange: (event:any) =>
199+
onChange: (event: any) =>
200200
setPassword(
201201
(event.target as HTMLInputElement).value
202202
),

src/services/builds.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Build, PaginatedData } from "../types";
22
import { handleResponse, authHeader } from "../_helpers/service.helpers";
33
import { API_URL } from "../_config/env.config";
4-
import {BuildDto} from "../types/dto/build.dto";
4+
import { BuildDto } from "../types/dto/build.dto";
55

66
const ENDPOINT_URL = "/builds";
77

@@ -47,7 +47,7 @@ async function update(id: string, body: BuildDto): Promise<Build> {
4747
const requestOptions = {
4848
method: "PATCH",
4949
headers: { "Content-Type": "application/json", ...authHeader() },
50-
body: JSON.stringify(body)
50+
body: JSON.stringify(body),
5151
};
5252

5353
return fetch(`${API_URL}${ENDPOINT_URL}/${id}`, requestOptions).then(

src/types/dto/build.dto.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export interface BuildDto {
2-
ciBuildId?: string;
3-
isRunning?: boolean;
2+
ciBuildId?: string;
3+
isRunning?: boolean;
44
}

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"resolveJsonModule": true,
2222
"isolatedModules": true,
2323
"noEmit": true,
24-
"jsx": "react"
24+
"jsx": "react",
25+
"noFallthroughCasesInSwitch": true
2526
},
2627
"include": [
2728
"src"

0 commit comments

Comments
 (0)