Сделал первые функции под MRP

This commit is contained in:
2026-05-06 23:15:50 +03:00
parent 5417092796
commit 3b7a740081
27 changed files with 2996 additions and 767 deletions
+25 -16
View File
@@ -1,21 +1,30 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import { defineConfig, globalIgnores } from 'eslint/config'
import js from "@eslint/js";
import pluginReact from "eslint-plugin-react";
import globals from "globals";
export default defineConfig([
globalIgnores(['dist']),
export default [
js.configs.recommended,
{
files: ['**/*.{js,jsx}'],
extends: [
js.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
],
files: ["**/*.jsx", "**/*.tsx"],
plugins: {
react: pluginReact,
},
languageOptions: {
globals: globals.browser,
parserOptions: { ecmaFeatures: { jsx: true } },
globals: {
...globals.browser,
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
rules: {
// Подключаем рекомендуемые правила вручную, если импорт конфига не работает
...pluginReact.configs.recommended.rules,
// ОТКЛЮЧАЕМ те самые правила для React 17+
"react/react-in-jsx-scope": "off",
"react/jsx-uses-react": "off",
},
},
])
];