pgtune/eslint.config.js
Alexey Vasiliev e7b071cd2b
Some checks failed
CodeQL / Analyze (push) Failing after 2s
Build and Deploy / Build (push) Failing after 4s
Build and Deploy / Deploy (push) Has been skipped
eslint
Signed-off-by: Alexey Vasiliev <leopard.not.a@gmail.com>
2025-11-30 00:32:10 +02:00

48 lines
1.2 KiB
JavaScript

import { defineConfig, globalIgnores } from 'eslint/config'
import reactPlugin from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
import globals from 'globals'
import js from '@eslint/js'
export default defineConfig([
globalIgnores(['**/dist', '**/.yarn/**', '**/.pnp.**']),
js.configs.recommended,
reactPlugin.configs.flat.recommended,
reactPlugin.configs.flat['jsx-runtime'],
reactRefresh.configs.recommended,
reactHooks.configs.flat.recommended,
eslintPluginPrettierRecommended,
{
files: ['**/*.js', '**/*.jsx'],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.jest
},
ecmaVersion: 'latest',
sourceType: 'module',
parserOptions: {
ecmaFeatures: {
jsx: true
}
}
},
settings: {
react: {
version: 'detect'
}
},
rules: {
'react-refresh/only-export-components': [
'warn',
{
allowConstantExport: true
}
],
'react/jsx-uses-react': 'error'
}
}
])