Skip to content

Commit 332d67c

Browse files
committed
refactor: refine ESLint configuration by removing unnecessary rules and adding object formatting settings
1 parent d3b4163 commit 332d67c

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

eslint.config.ts

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ const config: Linter.FlatConfig[] = [
6666
'no-redeclare': 'off', // TypeScript handles this better
6767

6868
// Turn off rules that don't exist or cause issues
69-
'react-hooks/exhaustive-deps': 'off',
70-
'@next/next/no-sync-scripts': 'off',
7169
'no-shadow-restricted-names': 'off',
7270

7371
// TypeScript specific rules - simplified and lenient
@@ -104,7 +102,7 @@ const config: Linter.FlatConfig[] = [
104102
'max-len': [
105103
'warn',
106104
{
107-
code: 512,
105+
code: 1024,
108106
tabWidth: 2,
109107
ignoreUrls: true,
110108
ignoreStrings: true,
@@ -113,6 +111,27 @@ const config: Linter.FlatConfig[] = [
113111
ignoreComments: false,
114112
},
115113
],
114+
115+
// Object formatting - allow single line objects
116+
'object-curly-newline': [
117+
'warn',
118+
{
119+
ObjectExpression: { multiline: true, consistent: true },
120+
ObjectPattern: { multiline: true, consistent: true },
121+
ImportDeclaration: { multiline: true, consistent: true },
122+
ExportDeclaration: { multiline: true, consistent: true },
123+
},
124+
],
125+
126+
// Align colons in multiline objects
127+
'key-spacing': [
128+
'warn',
129+
{
130+
beforeColon: false,
131+
afterColon: true,
132+
mode: 'strict',
133+
},
134+
],
116135
},
117136
settings: {
118137
react: {

0 commit comments

Comments
 (0)