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

eslint.config.js

32 lines816 Bytes

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