Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

eslint.config.js

35 lines890 Bytes

1// @ts-check
2​
3import pluginReact from '@eslint-react/eslint-plugin'
4// @ts-expect-error
5import pluginReactCompiler from 'eslint-plugin-react-compiler'
6// @ts-expect-error
7import pluginReactHooks from 'eslint-plugin-react-hooks'
8import rootConfig from '../../eslint.config.js'
9​
10export default [
11 ...rootConfig,
12 {
13 files: ['**/*.{ts,tsx}'],
14 ...pluginReact.configs.recommended,
15 },
16 {
17 plugins: {
18 'react-hooks': pluginReactHooks,
19 'react-compiler': pluginReactCompiler,
20 },
21 rules: {
22 '@eslint-react/dom/no-missing-button-type': 'off',
23 'react-compiler/react-compiler': 'error',
24 'react-hooks/exhaustive-deps': 'error',
25 'react-hooks/rules-of-hooks': 'error',
26 },
27 },
28 {
29 files: ['**/__tests__/**'],
30 rules: {
31 '@typescript-eslint/no-unnecessary-condition': 'off',
32 'react-compiler/react-compiler': 'off',
33 },
34 },