-
Notifications
You must be signed in to change notification settings - Fork 11
/
eslint.config.mjs
50 lines (49 loc) · 1.21 KB
/
eslint.config.mjs
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
import antfu from '@antfu/eslint-config'
import { fixupPluginRules } from '@eslint/compat'
import react from 'eslint-plugin-react'
import hooks from 'eslint-plugin-react-hooks'
export default antfu(
{
stylistic: true,
markdown: false,
ignores: [
'.idea',
'**/lib',
'**/.svelte-kit',
'CHANGELOG.md',
'vite.config.ts',
'**/shim.d.ts',
],
typescript: {
overrides: {
'ts/no-unsafe-assignment': 'off',
'ts/no-unsafe-member-access': 'off',
'ts/no-unsafe-argument': 'off',
'ts/no-unsafe-call': 'off',
'ts/no-unsafe-return': 'off',
'ts/unbound-method': 'off',
'ts/ban-types': 'off',
'ts/strict-boolean-expressions': 'off',
'unicorn/no-new-array': 'off',
},
},
},
{
files: ['**/react/**/*.tsx', '**/react/**/*.ts'],
plugins: {
'react': fixupPluginRules(react),
'react-hooks': fixupPluginRules(hooks),
},
settings: {
react: {
version: 'detect',
},
},
rules: {
...react.configs.recommended.rules,
...hooks.configs.recommended.rules,
'jsx-quotes': ['error', 'prefer-double'],
'react/react-in-jsx-scope': 'off',
},
},
)