Skip to content

Commit a113dc3

Browse files
committed
Update ESLint
1 parent bb4c53e commit a113dc3

File tree

7 files changed

+562
-52
lines changed

7 files changed

+562
-52
lines changed

.vscode/settings.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,5 @@
2424
"[javascriptreact]": {
2525
"editor.defaultFormatter": "esbenp.prettier-vscode"
2626
},
27-
"typescript.tsdk": "node_modules/typescript/lib",
28-
"files.exclude": {
29-
"**/.vscode": true,
30-
"**/.next": true,
31-
// "**/.git": false,
32-
"**/node_modules": true,
33-
"next-env.d.ts": true
34-
// "**/components.json": true
35-
}
27+
"typescript.tsdk": "node_modules/typescript/lib"
3628
}

app/(root)/questions/[id]/edit/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import React from "react";
33

44
import { auth } from "@/auth";
55
import QuestionForm from "@/components/forms/QuestionForm";
6-
import { getQuestion } from "@/lib/actions/question.action";
76
import ROUTES from "@/constants/routes";
7+
import { getQuestion } from "@/lib/actions/question.action";
88

99
const EditQuestion = async ({ params }: RouteParams) => {
1010
const { id } = await params;

app/(root)/questions/[id]/page.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1+
import Link from "next/link";
2+
import { redirect } from "next/navigation";
3+
import React from "react";
4+
15
import TagCard from "@/components/cards/TagCard";
26
import { Preview } from "@/components/editor/Preview";
37
import Metric from "@/components/Metric";
48
import UserAvatar from "@/components/UserAvatar";
59
import ROUTES from "@/constants/routes";
610
import { getQuestion } from "@/lib/actions/question.action";
711
import { formatNumber, getTimeStamp } from "@/lib/utils";
8-
import Link from "next/link";
9-
import { redirect } from "next/navigation";
10-
import React from "react";
12+
1113
import View from "../view";
1214

1315
const QuestionDetails = async ({ params }: RouteParams) => {

eslint.config.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const config = [
2121
"next/typescript",
2222
"standard",
2323
"plugin:tailwindcss/recommended",
24-
"plugin:prettier/recommended",
2524
"prettier"
2625
),
2726
{
@@ -56,7 +55,7 @@ const config = [
5655
},
5756
},
5857
],
59-
"comma-dangle": "es5",
58+
"comma-dangle": "off",
6059
},
6160
},
6261
{

lib/actions/question.action.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
"use server";
22

33
import mongoose, { Error, FilterQuery } from "mongoose";
4+
import { revalidatePath } from "next/cache";
45

6+
import ROUTES from "@/constants/routes";
57
import Question, { IQuestionDoc } from "@/database/question.model";
68
import TagQuestion from "@/database/tag-question.model";
79
import Tag, { ITagDoc } from "@/database/tag.model";
@@ -15,8 +17,6 @@ import {
1517
IncrementViewsSchema,
1618
PaginatedSearchParamsSchema,
1719
} from "../validations";
18-
import { revalidatePath } from "next/cache";
19-
import ROUTES from "@/constants/routes";
2020

2121
export async function createQuestion(
2222
params: CreateQuestionParams

0 commit comments

Comments
 (0)