Files
NanoKVM-USB-MIRROR/browser/eslint.config.js
2026-01-20 15:18:52 +08:00

28 lines
888 B
JavaScript

import js from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import reactRefreshPlugin from 'eslint-plugin-react-refresh';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{ ignores: ['dist', 'node_modules'] },
{
files: ['**/*.{ts,tsx}'],
extends: [js.configs.recommended, ...tseslint.configs.recommended, eslintConfigPrettier],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser
},
plugins: {
'react-hooks': reactHooksPlugin,
'react-refresh': reactRefreshPlugin
},
rules: {
...reactHooksPlugin.configs.recommended.rules,
'@typescript-eslint/no-explicit-any': 'off',
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }]
}
}
);