Skip to content

Commit

Permalink
chore: initialize eslint setup
Browse files Browse the repository at this point in the history
  • Loading branch information
uoon-dev committed Aug 19, 2021
1 parent 4787fb8 commit 404f24e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
build
33 changes: 33 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parser": "@typescript-eslint/parser", // eslint to TS
"plugins": ["@typescript-eslint"],
"extends": [
"plugin:@typescript-eslint/recommended", // ts 추천 rules https://github.com/typescript-eslint/typescript-eslint#readme
"plugin:react/recommended", // react 추천 rules. https://github.com/yannickcr/eslint-plugin-react
"plugin:react-hooks/recommended", // react-hook 추천 rules. https://github.com/facebook/react
"plugin:jsx-a11y/recommended", // jsx 추천 rules. https://www.npmjs.com/package/eslint-plugin-jsx-a11y
"plugin:import/errors", // es6+ import/export syntax linting 지원. https://www.npmjs.com/package/eslint-plugin-import
"plugin:import/warnings" // es6+ import/export syntax linting 지원. https://www.npmjs.com/package/eslint-plugin-import
],
"parserOptions": {
"ecmaVersion": 2018, // 문법 지원 (기본 값으로 둠)
"sourceType": "module" // 모듈 시스템 사용
},
"rules": {
// custom 해야할 규칙 선언
"@typescript-eslint/explicit-module-boundary-types": "off",
"react/react-in-jsx-scope": "off",
"import/no-unresolved": "off"
},
"settings": {
"react": {
"version": "detect"
},
// module resolve issue로 인해 추가, https://stackoverflow.com/questions/55198502/using-eslint-with-typescript-unable-to-resolve-path-to-module
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}

0 comments on commit 404f24e

Please sign in to comment.