-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy patheslint.config.ts
58 lines (55 loc) · 1.56 KB
/
eslint.config.ts
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
58
import module from 'node:module'
import nekoConfig from '@nekochan0122/config/eslint'
import eslintPluginTailwind from 'eslint-plugin-tailwindcss'
import eslintPluginTanStackQuery from 'eslint-plugin-tanstack-query'
import eslintPluginTanStackRouter from 'eslint-plugin-tanstack-router'
import globals from 'globals'
import tseslint from 'typescript-eslint'
const require = module.createRequire(import.meta.url)
export default tseslint.config(
...nekoConfig.presets.react,
...eslintPluginTailwind.configs['flat/recommended'],
...eslintPluginTanStackQuery.configs['flat/recommended'],
...eslintPluginTanStackRouter.configs['flat/recommended'],
{
name: 'react-compiler/recommended',
plugins: {
'react-compiler': require('eslint-plugin-react-compiler'),
},
rules: {
'react-compiler/react-compiler': 'error',
},
},
{
languageOptions: {
globals: globals.browser,
},
settings: {
tailwindcss: {
callees: ['cx', 'cva'],
whitelist: ['toaster'],
},
},
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
'react-refresh/only-export-components': 'off',
'unicorn/no-useless-undefined': 'off', // a quickfix for server function
'jsx-a11y/no-autofocus': ['error', { ignoreNonDOM: true }], // for react-day-picker autoFocus prop
},
},
{
files: [
'src/components/**/*.tsx',
],
rules: {
'jsx-a11y/heading-has-content': 'off',
'jsx-a11y/anchor-has-content': 'off',
},
},
{
ignores: [
'.vinxi',
'.output',
],
},
)