|
1 | 1 | import type { LinterConfigRules } from '../types/eslint.d.ts'; |
2 | 2 |
|
3 | 3 | const rules: LinterConfigRules = { |
4 | | - 'react/function-component-definition': [ |
5 | | - 'error', |
6 | | - { |
7 | | - namedComponents: ['arrow-function', 'function-declaration'], |
8 | | - unnamedComponents: 'arrow-function', |
9 | | - }, |
10 | | - ], |
11 | | - 'react/no-adjacent-inline-elements': 'error', |
| 4 | + 'react-x/component-hook-factories': 'error', |
| 5 | + 'react-x/error-boundaries': 'error', |
| 6 | + 'react-x/immutability': 'error', |
| 7 | + 'react-x/jsx-dollar': 'error', |
| 8 | + 'react-x/jsx-key-before-spread': 'error', |
| 9 | + 'react-x/no-access-state-in-setstate': 'error', |
| 10 | + 'react-x/no-class-component': 'error', |
| 11 | + 'react-x/no-context-provider': 'error', |
| 12 | + 'react-x/no-duplicate-key': 'error', |
| 13 | + 'react-x/no-forward-ref': 'error', |
| 14 | + 'react-x/no-implicit-key': 'error', |
| 15 | + 'react-x/no-leaked-conditional-rendering': 'error', |
| 16 | + 'react-x/no-misused-capture-owner-stack': 'error', |
| 17 | + 'react-x/no-nested-component-definitions': 'error', |
| 18 | + 'react-x/no-nested-lazy-component-declarations': 'error', |
| 19 | + 'react-x/no-unnecessary-use-callback': 'error', |
| 20 | + 'react-x/no-unnecessary-use-memo': 'error', |
| 21 | + 'react-x/no-unstable-context-value': 'error', |
| 22 | + 'react-x/no-unstable-default-props': 'error', |
| 23 | + 'react-x/no-use-context': 'error', |
| 24 | + 'react-x/prefer-destructuring-assignment': 'error', |
| 25 | + 'react-x/purity': 'error', |
| 26 | + 'react-x/refs': 'error', |
| 27 | + 'react-x/set-state-in-effect': 'error', |
| 28 | + 'react-x/set-state-in-render': 'error', |
| 29 | + 'react-x/unsupported-syntax': 'error', |
| 30 | + 'react-x/use-memo': 'error', |
| 31 | + 'react-x/use-state': 'error', |
12 | 32 | }; |
13 | 33 |
|
14 | 34 | export default rules; |
0 commit comments