From 36daa3dff28139099cb93196902ef5ceb97c8dbf Mon Sep 17 00:00:00 2001 From: SNUPI <47105088+joohaem@users.noreply.github.com> Date: Sat, 19 Mar 2022 20:13:20 +0900 Subject: [PATCH] =?UTF-8?q?init:=20lint=20-=20parser=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.json | 18 +++++++++++++----- next.config.js | 4 ++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 8d3e8fc..6f53479 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -19,11 +19,12 @@ ], "parser": "@typescript-eslint/parser", "parserOptions": { + "project": "./tsconfig.json", "ecmaFeatures": { "jsx": true }, - "ecmaVersion": "latest", - "sourceType": "module" + "ecmaVersion": "latest", // 사용할 ECMAScript 버전을 설정 + "sourceType": "module" // parser의 export 형태를 설정 }, "plugins": [ "react", @@ -61,13 +62,20 @@ "import/no-named-as-default": 0 // default로 정의되지 않은 아이들을 불러왔음을 알려줌 }, "settings": { + "react": { + "version": "detect" + }, "import/resolver": { "node": { "extensions": [".js", ".jsx", ".ts", ".tsx"] } }, - "react": { - "version": "detect" - } + "import/parsers": { // 추가 + "@typescript-eslint/parser": [ + ".ts", + ".tsx", + ".js" + ] + } } } \ No newline at end of file diff --git a/next.config.js b/next.config.js index a843cbe..91ef62f 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, -} +}; -module.exports = nextConfig +module.exports = nextConfig;