我更新了我的Eslint规则使用airbnb在我的反应类型成绩单项目。
我的项目不使用“create app”。所以我必须扩展airbnb,因为我也在使用和扩展airbnb-typescript。
eslint-plugin-react和eslint-plugin-react-hooks是eslint-config-airbnb的对等依赖关系。那么我需要扩展plugin:react/recommended'吗?
我在extend属性eslintrc.js中有这样的内容:
extends: [
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
// "plugin:@typescript-eslint/recommended",
// "plugin:@typescript-eslint/recommended-requiring-type-checking",
// "plugin:eslint-comments/recommended",
'plugin:react/recommended',
'plugin:jest/recommended',
'plugin:prettier/recommended',
],为了充分利用Eslint并做出反应,我是否需要扩展'plugin:react/recommended',或其他东西,或者我可以删除它,因为我使用的是airbnb和airbnb-typescript
与扩展“是”或“否”'plugin:react-hooks/recommended'的问题相同(因为如上所述,eslint-plugin-react-hooks也是eslint-config-airbnb的对等依赖项)。
发布于 2022-11-29 08:18:25
据我所知,您不需要添加plugin:react/recommended,因为您使用的是爱彼迎。如果您使用plugin:react-hooks/recommended,也可以使用airbnb/hooks。
https://stackoverflow.com/questions/72866515
复制相似问题