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