39 lines
994 B
JavaScript
39 lines
994 B
JavaScript
import js from '@eslint/js'
|
|
import globals from 'globals'
|
|
import tseslint from 'typescript-eslint'
|
|
import reactHooks from 'eslint-plugin-react-hooks'
|
|
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
import prettier from 'eslint-config-prettier'
|
|
|
|
export default tseslint.config(
|
|
{ ignores: ['node_modules', 'out', 'dist', 'release', '.vscode'] },
|
|
js.configs.recommended,
|
|
tseslint.configs.recommended,
|
|
{
|
|
files: [
|
|
'src/main/**/*.ts',
|
|
'src/preload/**/*.ts',
|
|
'electron.vite.config.ts',
|
|
'scripts/**/*.mjs'
|
|
],
|
|
languageOptions: {
|
|
globals: { ...globals.node }
|
|
}
|
|
},
|
|
{
|
|
files: ['src/renderer/**/*.{ts,tsx}'],
|
|
languageOptions: {
|
|
globals: { ...globals.browser }
|
|
},
|
|
plugins: {
|
|
'react-hooks': reactHooks,
|
|
'react-refresh': reactRefresh
|
|
},
|
|
rules: {
|
|
...reactHooks.configs.recommended.rules,
|
|
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }]
|
|
}
|
|
},
|
|
prettier
|
|
)
|