mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 22:52:08 +08:00
fix(eslint): reorganize eslint config to enable custom rules (#10234)
refactor(eslint): reorganize eslint config for better maintainability Move ignores section and oxlint configs to be grouped with other configurations
This commit is contained in:
parent
f039aa253d
commit
63be1d8cf2
@ -48,6 +48,27 @@ export default defineConfig([
|
|||||||
'@eslint-react/no-children-to-array': 'off'
|
'@eslint-react/no-children-to-array': 'off'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
ignores: [
|
||||||
|
'node_modules/**',
|
||||||
|
'build/**',
|
||||||
|
'dist/**',
|
||||||
|
'out/**',
|
||||||
|
'local/**',
|
||||||
|
'.yarn/**',
|
||||||
|
'.gitignore',
|
||||||
|
'scripts/cloudflare-worker.js',
|
||||||
|
'src/main/integration/nutstore/sso/lib/**',
|
||||||
|
'src/main/integration/cherryin/index.js',
|
||||||
|
'src/main/integration/nutstore/sso/lib/**',
|
||||||
|
'src/renderer/src/ui/**',
|
||||||
|
'packages/**/dist'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// turn off oxlint supported rules.
|
||||||
|
...oxlint.configs['flat/eslint'],
|
||||||
|
...oxlint.configs['flat/typescript'],
|
||||||
|
...oxlint.configs['flat/unicorn'],
|
||||||
{
|
{
|
||||||
// LoggerService Custom Rules - only apply to src directory
|
// LoggerService Custom Rules - only apply to src directory
|
||||||
files: ['src/**/*.{ts,tsx,js,jsx}'],
|
files: ['src/**/*.{ts,tsx,js,jsx}'],
|
||||||
@ -110,25 +131,4 @@ export default defineConfig([
|
|||||||
'i18n/no-template-in-t': 'warn'
|
'i18n/no-template-in-t': 'warn'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
ignores: [
|
|
||||||
'node_modules/**',
|
|
||||||
'build/**',
|
|
||||||
'dist/**',
|
|
||||||
'out/**',
|
|
||||||
'local/**',
|
|
||||||
'.yarn/**',
|
|
||||||
'.gitignore',
|
|
||||||
'scripts/cloudflare-worker.js',
|
|
||||||
'src/main/integration/nutstore/sso/lib/**',
|
|
||||||
'src/main/integration/cherryin/index.js',
|
|
||||||
'src/main/integration/nutstore/sso/lib/**',
|
|
||||||
'src/renderer/src/ui/**',
|
|
||||||
'packages/**/dist'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
// turn off oxlint supported rules.
|
|
||||||
...oxlint.configs['flat/eslint'],
|
|
||||||
...oxlint.configs['flat/typescript'],
|
|
||||||
...oxlint.configs['flat/unicorn']
|
|
||||||
])
|
])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user