react.js 594 B

12345678910111213141516171819202122232425
  1. // @ts-check
  2. import reactPlugin from 'eslint-plugin-react';
  3. import reactHooks from 'eslint-plugin-react-hooks';
  4. import base from './base.js';
  5. /** @type {import('eslint').Linter.Config[]} */
  6. export default [
  7. ...base,
  8. {
  9. files: ['**/*.{ts,tsx,jsx}'],
  10. plugins: {
  11. react: reactPlugin,
  12. 'react-hooks': reactHooks,
  13. },
  14. settings: {
  15. react: { version: 'detect' },
  16. },
  17. rules: {
  18. ...reactPlugin.configs.recommended.rules,
  19. ...reactHooks.configs.recommended.rules,
  20. 'react/react-in-jsx-scope': 'off',
  21. 'react/prop-types': 'off',
  22. },
  23. },
  24. ];