Сделал первые функции под MRP
This commit is contained in:
+25
-16
@@ -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",
|
||||
},
|
||||
},
|
||||
])
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user