-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.ts
More file actions
94 lines (79 loc) · 2.29 KB
/
eslint.config.ts
File metadata and controls
94 lines (79 loc) · 2.29 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import { dirname } from 'node:path'
import { fileURLToPath } from 'node:url'
import { defineConfig } from 'eslint-config-hyoban'
const tsconfigRootDir = dirname(fileURLToPath(import.meta.url))
const hyobanConfig = await defineConfig(
{
formatting: false, // Use Prettier for formatting
lessOpinionated: true,
preferESM: true, // Next.js uses ESM
react: true,
tailwindCSS: true,
},
{
languageOptions: {
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir,
},
},
// TailwindCSS v4 usually has no config file. Silence the plugin's
// config resolution warning by explicitly disabling auto-resolution.
settings: {
tailwindcss: {
// ESLint plugin will not attempt to resolve tailwind config
// which avoids repeated "Cannot resolve default tailwindcss config path" warnings.
config: false,
},
},
rules: {
// TypeScript
'@typescript-eslint/triple-slash-reference': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
// Unicorn
'unicorn/prefer-math-trunc': 'off',
'unicorn/no-static-only-class': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/no-document-cookie': 'off', // Disable due to toReversed() compatibility issue
// React
'@eslint-react/no-clone-element': 'off',
'@eslint-react/hooks-extra/no-direct-set-state-in-use-effect': 'off',
// TailwindCSS v4 not support custom classname detection
'tailwindcss/no-custom-classname': 'off',
// General
'no-restricted-syntax': 'off',
// Disable React Compiler rules (not using React 19 compiler yet)
'react-compiler/react-compiler': 'off',
},
},
// Disable type checking for config files
{
files: ['*.config.js', '*.config.mjs', '*.config.ts'],
languageOptions: {
parserOptions: {
project: null,
},
},
},
{
files: ['**/*.tsx'],
rules: {
'@stylistic/jsx-self-closing-comp': 'error',
},
},
// Ignore build outputs and generated files
{
ignores: [
'dist/**',
'build/**',
'.next/**',
'out/**',
'node_modules/**',
'drizzle/**',
'public/**',
'.turbo/**',
'.contentlayer/**',
],
},
)
export default hyobanConfig