ESLint with React gives `no-unused-vars` errors

前端 未结 6 754
隐瞒了意图╮
隐瞒了意图╮ 2020-11-28 05:00

I\'ve setup eslint & eslint-plugin-react.

When I run ESLint, the linter returns no-unused-vars errors for each React comp

6条回答
  •  被撕碎了的回忆
    2020-11-28 05:34

    In your .eslintrc.json, under extends, include the following plugin:

    'extends': [
        'plugin:react/recommended'
    ]
    

    Source

提交回复
热议问题