From 13cff678acd02234c077fce09bcc26d72d2f4ad5 Mon Sep 17 00:00:00 2001 From: hanbin9775 Date: Sun, 11 Jul 2021 15:24:03 +0900 Subject: [PATCH] [#1] add: eslintrc file --- .eslintrc | 39 +++++++++++++++++++++++++++++++++++++++ src/components/App.tsx | 6 +++--- tsconfig.json | 2 +- 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 .eslintrc diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..f585e91 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,39 @@ +{ + "extends": [ + "prettier", + "airbnb", + "airbnb/hooks", + "prettier/react", + "plugin:@typescript-eslint/recommended", + "prettier/@typescript-eslint", + "plugin:prettier/recommended" + ], + "parser": "@typescript-eslint/parser", + "settings": { + "import/resolver": { + "node": { + "extensions": [".js", ".jsx", ".ts", ".tsx"] + } + } + }, + "plugins": ["@typescript-eslint"], + "rules": { + "indent": ["error", 2], + "import/extensions": [ + "error", + "ignorePackages", + { + "js": "never", + "jsx": "never", + "ts": "never", + "tsx": "never", + "json": "never" + } + ], + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "no-use-before-define": "off", + "import/no-unresolved": "off", + "react/jsx-filename-extension": [1, { "extensions": [".tsx", ".ts"] }] + } +} diff --git a/src/components/App.tsx b/src/components/App.tsx index f18fd56..f102605 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -1,6 +1,6 @@ -import GreetingPage from 'pages/GreetingPage'; -import { Route, Switch } from 'react-router-dom'; -import GlobalStyle from 'styles/GlobalStyle'; +import GreetingPage from "pages/GreetingPage"; +import { Route, Switch } from "react-router-dom"; +import GlobalStyle from "styles/GlobalStyle"; const App = () => { return ( diff --git a/tsconfig.json b/tsconfig.json index 545c655..126ba43 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,7 +15,7 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "jsx": "react-jsx" + "jsx": "react" }, "include": ["src"] }