0

I updated my Eslint rules using airbnb in my React typescript project.

My project doesn't use 'create-reac-app'. So I have to extend airbnb since I am also using and extending airbnb-typescript.

eslint-plugin-react and eslint-plugin-react-hooks are peer dependencies of eslint-config-airbnb. So do I need to extend plugin:react/recommended'?

I have this in the extend property inside 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',
  ],

To get the best out of Eslint and React, do I have to extend 'plugin:react/recommended', or something else or can I remove it since I am using airbnb and airbnb-typescript?

And the same question I have with extending yes or no 'plugin:react-hooks/recommended' (since eslint-plugin-react-hooks is also a peer dependency of eslint-config-airbnb as mentioned above).

meez
  • 3,783
  • 5
  • 37
  • 91

1 Answers1

0

As far as I understand you don't need to add plugin:react/recommended since you are using airbnb. Same with plugin:react-hooks/recommended if you use airbnb/hooks.

Capucine
  • 21
  • 3