-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
47 lines (46 loc) · 1.32 KB
/
eslint.config.js
File metadata and controls
47 lines (46 loc) · 1.32 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
import js from '@eslint/js'
import reactHooks from 'eslint-plugin-react-hooks'
import { defineConfig, globalIgnores } from 'eslint/config'
export default defineConfig([
globalIgnores(['.next', 'node_modules', 'fill-missing.js', 'generate-house*.js']),
{
files: ['**/*.{js,jsx}'],
extends: [
js.configs.recommended,
reactHooks.configs.flat.recommended,
],
languageOptions: {
ecmaVersion: 'latest',
globals: {
React: 'readonly',
console: 'readonly',
window: 'readonly',
document: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
requestAnimationFrame: 'readonly',
cancelAnimationFrame: 'readonly',
fetch: 'readonly',
URL: 'readonly',
Response: 'readonly',
ReadableStream: 'readonly',
TextEncoder: 'readonly',
process: 'readonly',
navigator: 'readonly',
matchMedia: 'readonly',
localStorage: 'readonly',
performance: 'readonly',
},
parserOptions: {
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
rules: {
'no-unused-vars': ['warn', { varsIgnorePattern: '^[A-Z_]' }],
'react-hooks/set-state-in-effect': 'off',
},
},
])