Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

fix lint issues

Amruth Pillai02ce1ad48cde
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
index 6a302fe53..1b301e19f 100644
--- a/.vscode/extensions.json
+++ b/.vscode/extensions.json
@@ -1,8 +1,3 @@
{
- "recommendations": [
- "nrwl.angular-console",
- "esbenp.prettier-vscode",
- "dbaeumer.vscode-eslint",
- "firsttris.vscode-jest-runner"
- ]
+ "recommendations": ["nrwl.angular-console", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
}
diff --git a/apps/client/src/constants/llm.ts b/apps/client/src/constants/llm.ts
index ee5bd027a..b713400a6 100644
--- a/apps/client/src/constants/llm.ts
+++ b/apps/client/src/constants/llm.ts
@@ -1,2 +1,2 @@
export const DEFAULT_MODEL = "gpt-3.5-turbo";
-export const DEFAULT_MAX_TOKENS = 1024
\ No newline at end of file
+export const DEFAULT_MAX_TOKENS = 1024;
diff --git a/apps/client/src/pages/dashboard/settings/_sections/openai.tsx b/apps/client/src/pages/dashboard/settings/_sections/openai.tsx
index 6830e8a05..6f5cdf435 100644
--- a/apps/client/src/pages/dashboard/settings/_sections/openai.tsx
+++ b/apps/client/src/pages/dashboard/settings/_sections/openai.tsx
@@ -16,18 +16,19 @@ import { cn } from "@reactive-resume/utils";
import { useForm } from "react-hook-form";
import { z } from "zod";
-import { useOpenAiStore } from "@/client/stores/openai";
import { DEFAULT_MAX_TOKENS, DEFAULT_MODEL } from "@/client/constants/llm";
+import { useOpenAiStore } from "@/client/stores/openai";
const formSchema = z.object({
apiKey: z
.string()
- // eslint-disable-next-line lingui/t-call-in-function
- .regex(/^sk-.+$/, t`That doesn't look like a valid OpenAI API key.`)
+ // eslint-disable-next-line lingui/no-unlocalized-strings
+ .regex(/^sk-.+$/, "That doesn't look like a valid OpenAI API key.")
.default(""),
baseURL: z
.string()
- .regex(/https?:\/\/[^\/]+\/?v1$/, t`That doesn't look like a valid URL`)
+ // eslint-disable-next-line lingui/no-unlocalized-strings
+ .regex(/https?:\/\/[^/]+\/?v1$/, "That doesn't look like a valid URL")
.default(""),
model: z.string().default(DEFAULT_MODEL),
maxTokens: z.number().default(DEFAULT_MAX_TOKENS),
@@ -162,7 +163,9 @@ export const OpenAISettings = () => {
type="number"
placeholder={`${DEFAULT_MAX_TOKENS}`}
{...field}
- onChange={(e) => field.onChange(e.target.valueAsNumber)}
+ onChange={(e) => {
+ field.onChange(e.target.valueAsNumber);
+ }}
/>
</FormControl>
<FormMessage />
diff --git a/apps/client/src/services/openai/change-tone.ts b/apps/client/src/services/openai/change-tone.ts
index 4ac3d8143..11dab158d 100644
--- a/apps/client/src/services/openai/change-tone.ts
+++ b/apps/client/src/services/openai/change-tone.ts
@@ -2,9 +2,10 @@
import { t } from "@lingui/macro";
-import { openai } from "./client";
-import { useOpenAiStore } from "@/client/stores/openai";
import { DEFAULT_MAX_TOKENS, DEFAULT_MODEL } from "@/client/constants/llm";
+import { useOpenAiStore } from "@/client/stores/openai";
+
+import { openai } from "./client";
const PROMPT = `You are an AI writing assistant specialized in writing copy for resumes.
Do not return anything else except the text you improved. It should not begin with a newline. It should not have any prefix or suffix text.
diff --git a/apps/client/src/services/openai/client.ts b/apps/client/src/services/openai/client.ts
index 42a915e6b..5d0ff38d6 100644
--- a/apps/client/src/services/openai/client.ts
+++ b/apps/client/src/services/openai/client.ts
@@ -12,7 +12,7 @@ export const openai = () => {
);
}
- if(baseURL) {
+ if (baseURL) {
return new OpenAI({
baseURL,
apiKey,
diff --git a/apps/client/src/services/openai/fix-grammar.ts b/apps/client/src/services/openai/fix-grammar.ts
index b3a853072..6755c1985 100644
--- a/apps/client/src/services/openai/fix-grammar.ts
+++ b/apps/client/src/services/openai/fix-grammar.ts
@@ -2,9 +2,10 @@
import { t } from "@lingui/macro";
-import { openai } from "./client";
-import { useOpenAiStore } from "@/client/stores/openai";
import { DEFAULT_MAX_TOKENS, DEFAULT_MODEL } from "@/client/constants/llm";
+import { useOpenAiStore } from "@/client/stores/openai";
+
+import { openai } from "./client";
const PROMPT = `You are an AI writing assistant specialized in writing copy for resumes.
Do not return anything else except the text you improved. It should not begin with a newline. It should not have any prefix or suffix text.
diff --git a/apps/client/src/services/openai/improve-writing.ts b/apps/client/src/services/openai/improve-writing.ts
index ff1419af4..8290cba67 100644
--- a/apps/client/src/services/openai/improve-writing.ts
+++ b/apps/client/src/services/openai/improve-writing.ts
@@ -2,9 +2,10 @@
import { t } from "@lingui/macro";
-import { openai } from "./client";
-import { useOpenAiStore } from "@/client/stores/openai";
import { DEFAULT_MAX_TOKENS, DEFAULT_MODEL } from "@/client/constants/llm";
+import { useOpenAiStore } from "@/client/stores/openai";
+
+import { openai } from "./client";
const PROMPT = `You are an AI writing assistant specialized in writing copy for resumes.
Do not return anything else except the text you improved. It should not begin with a newline. It should not have any prefix or suffix text.
diff --git a/apps/client/src/stores/openai.ts b/apps/client/src/stores/openai.ts
index 8d279d905..316ddf209 100644
--- a/apps/client/src/stores/openai.ts
+++ b/apps/client/src/stores/openai.ts
@@ -1,5 +1,6 @@
import { create } from "zustand";
import { persist } from "zustand/middleware";
+
import { DEFAULT_MAX_TOKENS, DEFAULT_MODEL } from "../constants/llm";
type OpenAIStore = {