Metatron-Drive-Software/eslint.config.js
2026-06-30 22:24:34 +05:30

36 lines
1.0 KiB
JavaScript

import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import react from 'eslint-plugin-react'
export default [
{ ignores: ['dist', 'release', 'node_modules'] },
{
files: ['src/**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2022,
globals: { ...globals.browser },
parserOptions: { ecmaVersion: 'latest', ecmaFeatures: { jsx: true }, sourceType: 'module' },
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
react,
},
settings: { react: { version: 'detect' } },
rules: {
...js.configs.recommended.rules,
...reactHooks.configs.flat.recommended.rules,
...reactRefresh.configs.vite.rules,
...react.configs.recommended.rules,
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
},
},
{
files: ['electron/**/*.cjs'],
languageOptions: { ecmaVersion: 2022, globals: { ...globals.node }, sourceType: 'commonjs' },
},
]