first commmit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import js from "@eslint/js";
|
||||
import pluginReact from "eslint-plugin-react";
|
||||
import globals from "globals";
|
||||
|
||||
export default [
|
||||
js.configs.recommended,
|
||||
{
|
||||
files: ["**/*.jsx", "**/*.tsx"],
|
||||
plugins: {
|
||||
react: pluginReact,
|
||||
},
|
||||
languageOptions: {
|
||||
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