Skip to content

Commit bf51307

Browse files
committed
adding linting and formatting
1 parent 769d020 commit bf51307

27 files changed

+9800
-89
lines changed

app/.eslintrc.json

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
11
{
2-
"extends": "next/core-web-vitals"
3-
}
2+
"parser": "@typescript-eslint/parser",
3+
"env": {
4+
"browser": true,
5+
"es2021": true
6+
},
7+
"extends": [
8+
"next/core-web-vitals",
9+
"standard-with-typescript"
10+
],
11+
"parserOptions": {
12+
"ecmaVersion": "latest",
13+
"sourceType": "module"
14+
},
15+
"ignorePatterns": [
16+
"scripts/**",
17+
"build/**"
18+
],
19+
"rules": {
20+
"@typescript-eslint/indent": "off",
21+
"@typescript-eslint/quotes": "off",
22+
"@typescript-eslint/explicit-function-return-type": "off",
23+
"@typescript-eslint/semi": [
24+
"error",
25+
"always"
26+
],
27+
"@typescript-eslint/no-misused-promises": "off",
28+
"@typescript-eslint/space-before-function-paren": "off",
29+
"@typescript-eslint/comma-dangle": [
30+
"error",
31+
"always-multiline"
32+
]
33+
}
34+
}

app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "next lint"
9+
"lint": "next lint --fix"
1010
},
1111
"dependencies": {
1212
"formik": "^2.4.5",
@@ -25,4 +25,4 @@
2525
"tailwindcss": "^3.3.0",
2626
"typescript": "^5"
2727
}
28-
}
28+
}

app/src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const metadata: Metadata = {
1212
export default function RootLayout({
1313
children,
1414
}: {
15-
children: React.ReactNode;
15+
children: React.ReactNode
1616
}) {
1717
return (
1818
<html lang="en">

app/src/components/QuestionForm.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Formik, Form, Field } from 'formik';
22
import CircularProgress from './CircularProgress';
33

44
interface QuestionFormProps {
5-
onSubmit: (question: string) => Promise<void> | void;
5+
onSubmit: (question: string) => Promise<void> | void
66
}
77

88
export default function QuestionForm({ onSubmit }: QuestionFormProps) {
@@ -27,9 +27,11 @@ export default function QuestionForm({ onSubmit }: QuestionFormProps) {
2727
<button
2828
type="submit"
2929
className="absolute inset-y-0 right-0 px-4 text-white bg-indigo-600 rounded-r hover:bg-indigo-700 focus:outline-none focus:bg-indigo-700">
30-
{isSubmitting ? (
30+
{isSubmitting
31+
? (
3132
<CircularProgress />
32-
) : (
33+
)
34+
: (
3335
<svg
3436
className="w-6 h-6 fill-current"
3537
xmlns="http://www.w3.org/2000/svg"

app/src/components/VideoList.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import Image from 'next/image';
22

33
export interface VideoDocument {
4-
pageContent: string;
4+
pageContent: string
55
metadata: {
6-
id: string;
7-
link: string;
8-
title: string;
9-
description: string;
10-
thumbnail: string;
11-
};
6+
id: string
7+
link: string
8+
title: string
9+
description: string
10+
thumbnail: string
11+
}
1212
}
1313

1414
const VideoList = ({ videos }: { videos: VideoDocument[] }) => {

docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ services:
2222
env_file:
2323
- ./app/.env
2424
- ./.env.app
25+
volumes:
26+
- ./app:/usr/src/app
27+
- /usr/src/app/node_modules
28+
- /usr/src/app/.next
29+
restart: always
2530
depends_on:
2631
- redis
2732

@@ -37,5 +42,9 @@ services:
3742
env_file:
3843
- ./services/video-search/.env
3944
- ./.env.video-search
45+
volumes:
46+
- ./services/video-search:/usr/src/app
47+
- /service/node_modules
48+
restart: always
4049
depends_on:
4150
- redis

0 commit comments

Comments
 (0)