-
Notifications
You must be signed in to change notification settings - Fork 7
/
eslint.config.mjs
54 lines (53 loc) · 1.42 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
51
52
53
54
import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'
import react from 'eslint-plugin-react'
import reactRefresh from 'eslint-plugin-react-refresh'
import reactHooks from 'eslint-plugin-react-hooks'
import tailwindcss from 'eslint-plugin-tailwindcss'
import prettier from 'eslint-config-prettier'
export default tseslint.config(
eslint.configs.recommended,
tseslint.configs.recommended,
{
ignores: ['dist/**', 'src-tauri/target/**'],
},
{
files: ['**/*.cjs'],
languageOptions: {
globals: {
module: true,
},
},
},
{
files: ['**/*.{js,jsx,ts,tsx}'],
languageOptions: {
parser: tseslint.parser,
ecmaVersion: 2020,
sourceType: 'module',
globals: {
browser: true,
},
},
plugins: {
react,
'react-refresh': reactRefresh,
'react-hooks': reactHooks,
tailwindcss,
},
rules: {
// ...react.configs.recommended.rules,
// ...react.configs['jsx-runtime'].rules,
...reactHooks.configs.recommended.rules,
...tailwindcss.configs.recommended.rules,
'no-console': 'warn',
'react-refresh/only-export-components': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true, argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' },
],
'@typescript-eslint/no-empty-object-type': 'off',
},
},
prettier
)