Skip to content

Commit

Permalink
Add react/function-component-definition (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
doong-jo committed May 9, 2022
1 parent 538fde3 commit dad00cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion web/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
],
plugins: ["react", "jsx-a11y", "import", "prettier", "@typescript-eslint", "simple-import-sort",],
plugins: ["react", "jsx-a11y", "import", "prettier", "@typescript-eslint", "simple-import-sort"],
ignorePatterns: [".eslintrc.js", "webpack.config.js"],
globals: {},
rules: {
Expand Down Expand Up @@ -73,6 +73,7 @@ module.exports = {
"react/jsx-props-no-spreading": "off",
"react/no-array-index-key": "warn",
"react/button-has-type": "warn",
"react/function-component-definition": [2, { "namedComponents": "arrow-function" }],
// reference: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#eslint
// react 17이상 버전을 쓴다면 아래 주석을 해제하세요.
// "react/jsx-uses-react": "off",
Expand Down
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-prettier": "3.3.1",
"eslint-plugin-react": "7.23.1",
"eslint-plugin-react": "7.29.4",
"eslint-plugin-react-hooks": "4.2.0",
"eslint-plugin-simple-import-sort": "7.0.0"
},
Expand Down

0 comments on commit dad00cc

Please sign in to comment.