From d1e97967fe9ea1d62059d2bf038b22daa82780ef Mon Sep 17 00:00:00 2001 From: "jason.lam" Date: Fri, 2 May 2025 11:33:37 +0800 Subject: [PATCH] [config] update IDE typescript config --- .eslintrc.json | 25 +++++++++++++++++-------- tsconfig.json | 5 +++-- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7159cbb..3e394da 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,16 +1,25 @@ { - "extends": ["next/core-web-vitals", "plugin:@typescript-eslint/recommended", "prettier"], + "extends": [ + "next/core-web-vitals", + "plugin:@typescript-eslint/recommended", + "prettier" + ], "plugins": ["prettier", "@typescript-eslint"], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2020, + "sourceType": "module" + }, "rules": { - // "prettier/prettier": "warn", "prettier/prettier": [ - "error", + "error", { - "endOfLine": "off" + "endOfLine": "auto" } - ], + ], "no-unused-vars": "off", - // "@typescript-eslint/no-explicit-any": ["off"], - "@typescript-eslint/no-unused-vars": "warn" + "@typescript-eslint/no-unused-vars": "warn", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" // Optional: adjust based on your project's needs } -} +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index e59724b..a2591ca 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,8 +19,9 @@ } ], "paths": { - "@/*": ["./src/*"] - } + "@/*": ["/src/*"] + }, + "baseUrl": "." }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "exclude": ["node_modules"]