xmr-btc-swap/src-gui/eslint.config.js
2025-12-01 21:14:00 +01:00

50 lines
1.3 KiB
JavaScript

import globals from "globals";
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
import importPlugin from "eslint-plugin-import";
export default [
{ ignores: ["node_modules", "dist"] },
js.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
{
languageOptions: {
globals: globals.browser,
},
plugins: {
import: importPlugin,
},
settings: {
react: {
version: "detect",
},
},
rules: {
"react/react-in-jsx-scope": "off",
"react/no-unescaped-entities": "off",
"react/no-children-prop": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-empty-object-type": "off",
"import/no-cycle": ["error", { maxDepth: 10 }],
"no-restricted-globals": [
"warn",
{
name: "open",
message:
"Use the open(...) function from @tauri-apps/plugin-shell instead",
},
],
"no-restricted-properties": [
"warn",
{
object: "window",
property: "open",
message:
"Use the open(...) function from @tauri-apps/plugin-shell instead",
},
],
},
},
];