-
Notifications
You must be signed in to change notification settings - Fork 973
Expand file tree
/
Copy patheslint.config.mjs
More file actions
57 lines (56 loc) · 1.58 KB
/
eslint.config.mjs
File metadata and controls
57 lines (56 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import tsParser from '@typescript-eslint/parser';
import { defineConfig } from 'eslint/config';
import reactHooks from 'eslint-plugin-react-hooks';
export default defineConfig([
{
ignores: [
'**/.pnpm-store/**',
'**/*.spec.*',
'**/*.slow.*',
'**/node_modules/**',
'**/dist/**',
'**/.next/**',
'**/build/**',
'**/.turbo/**',
'**/coverage/**',
'**/templates/**',
'**/.contentlayer/**',
'**/public/**',
'**/*.config.*',
'**/*.d.ts',
'.changeset/**',
'tooling/**',
],
},
// React Hooks config for apps/www (React 19 with React Compiler)
{
...reactHooks.configs.flat.recommended,
files: [
'apps/www/src/**/*.tsx',
'apps/www/src/**/use*.ts',
'packages/**/src/**/*.tsx',
'packages/**/src/**/use*.ts',
],
languageOptions: { parser: tsParser },
},
// Disable React Compiler rules for packages (React 18 compatibility)
{
files: ['packages/**'],
rules: {
'react-hooks/config': 'off',
'react-hooks/error-boundaries': 'off',
'react-hooks/gating': 'off',
'react-hooks/globals': 'off',
'react-hooks/incompatible-library': 'off',
'react-hooks/immutability': 'off',
'react-hooks/preserve-manual-memoization': 'off',
'react-hooks/purity': 'off',
'react-hooks/refs': 'off',
'react-hooks/set-state-in-effect': 'off',
'react-hooks/set-state-in-render': 'off',
'react-hooks/static-components': 'off',
'react-hooks/unsupported-syntax': 'off',
'react-hooks/use-memo': 'off',
},
},
]);