Skip to content

Commit dad00cc

Browse files
authored
Add react/function-component-definition (#42)
1 parent 538fde3 commit dad00cc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

web/.eslintrc.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
"plugin:@typescript-eslint/recommended",
2424
"plugin:import/typescript",
2525
],
26-
plugins: ["react", "jsx-a11y", "import", "prettier", "@typescript-eslint", "simple-import-sort",],
26+
plugins: ["react", "jsx-a11y", "import", "prettier", "@typescript-eslint", "simple-import-sort"],
2727
ignorePatterns: [".eslintrc.js", "webpack.config.js"],
2828
globals: {},
2929
rules: {
@@ -73,6 +73,7 @@ module.exports = {
7373
"react/jsx-props-no-spreading": "off",
7474
"react/no-array-index-key": "warn",
7575
"react/button-has-type": "warn",
76+
"react/function-component-definition": [2, { "namedComponents": "arrow-function" }],
7677
// reference: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#eslint
7778
// react 17이상 버전을 쓴다면 아래 주석을 해제하세요.
7879
// "react/jsx-uses-react": "off",

web/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"eslint-plugin-import": "2.22.1",
1818
"eslint-plugin-jsx-a11y": "6.4.1",
1919
"eslint-plugin-prettier": "3.3.1",
20-
"eslint-plugin-react": "7.23.1",
20+
"eslint-plugin-react": "7.29.4",
2121
"eslint-plugin-react-hooks": "4.2.0",
2222
"eslint-plugin-simple-import-sort": "7.0.0"
2323
},

0 commit comments

Comments
 (0)