Fix fullscreen controls and refresh lint setup

This commit is contained in:
Mert Uyanık
2025-10-29 08:15:14 +03:00
parent 90cef46560
commit 379f0a0058
5 changed files with 150 additions and 37 deletions
+51
View File
@@ -0,0 +1,51 @@
import js from '@eslint/js'
import tsParser from '@typescript-eslint/parser'
import tsPlugin from '@typescript-eslint/eslint-plugin'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import globals from 'globals'
export default [
{
ignores: ['dist/**', 'node_modules/**']
},
js.configs.recommended,
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
globals: {
...globals.browser,
...globals.es2021
}
},
plugins: {
'@typescript-eslint': tsPlugin,
'react-hooks': reactHooks,
'react-refresh': reactRefresh
},
rules: {
...tsPlugin.configs.recommended.rules,
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react-refresh/only-export-components': 'warn'
}
},
{
files: ['**/*.config.{js,ts}', '**/*.config.{cjs,mjs}', 'vite.config.*', 'eslint.config.js'],
languageOptions: {
globals: {
...globals.node
}
}
}
]