Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

4.7 KB
Raw Blame
{
  "extends": [
    "../../.eslintrc.base.json"
  ],
  "ignorePatterns": [
    "!**/*"
  ],
  "overrides": [
    {
      "files": [
        "**/*.ts",
        "**/*.tsx"
      ],
      "parser": "@typescript-eslint/parser",
      "settings": {
        "react": {
          "version": "detect"
        },
        "import/resolver": {
          "typescript": {},
          "alias": {
            "map": [
              [
                "@",
                "./src"
              ]
            ],
            "extensions": [
              ".ts",
              ".tsx",
              ".js",
              ".jsx",
              ".json"
            ]
          }
        }
      },
      "env": {
        "browser": true,
        "node": true,
        "es6": true
      },
      "extends": [
        "eslint:recommended",
        "plugin:import/errors",
        "plugin:import/warnings",
        "plugin:import/typescript",
        "plugin:@typescript-eslint/recommended",
        "plugin:react/recommended",
        "plugin:react-hooks/recommended",
        //"plugin:jsx-a11y/recommended",
        "plugin:prettier/recommended",
        "plugin:testing-library/react",
        "plugin:jest-dom/recommended",
        "plugin:vitest/legacy-recommended"
      ],
      "rules": {
        "react-hooks/rules-of-hooks": "error",
        "react-hooks/exhaustive-deps": "warn",
        "no-restricted-imports": [
          "error",
          {
            "patterns": ["lodash", "lodash/*"],
            "paths": [
              {
                "name": "react-use",
                "importNames": ["useLocation"],
                "message": "Use useLocation from react-router-dom. The embed mounts a memory router, so window.location is not the app route."
              }
            ]
          }
        ],
        "import/no-restricted-paths": [
          "error",
          {
            "zones": [
              // Previous restrictions...
              // enforce unidirectional codebase:
              // e.g. src/app can import from src/features but not the other way around
              {
                "target": "./src/features",
                "from": "./src/app"
              },
              {
                "target": [
                  "./src/components",
                  "./src/hooks",
                  "./src/lib",
                  "./src/types",
                  "./src/utils"
                ],
                "from": [
                  "./src/features",
                  "./src/app"
                ],
                "except": [
                  "../app/query-client.ts"
                ]
              }
            ]
          }
        ],
        "import/no-cycle": "off",
        "linebreak-style": [
          "error",
          "unix"
        ],
        "react/prop-types": "error",
        "import/order": [
          "error",
          {
            "groups": [
              "builtin",
              "external",
              "internal",
              "parent",
              "sibling",
              "index",
              "object"
            ],
            "newlines-between": "always",
            "alphabetize": {
              "order": "asc",
              "caseInsensitive": true
            }
          }
        ],
        "import/default": "off",
        "import/no-named-as-default-member": "off",
        "import/no-named-as-default": "off",
        "react/react-in-jsx-scope": "off",
        "jsx-a11y/anchor-is-valid": "off",
        "unused-imports/no-unused-imports": "error",
        "@typescript-eslint/no-unused-vars": [
          "error",
          {
            "varsIgnorePattern": "^_",
            "argsIgnorePattern": "^_"
          }
        ],
        "@typescript-eslint/explicit-function-return-type": [
          "off"
        ],
        "@typescript-eslint/explicit-module-boundary-types": [
          "off"
        ],
        "@typescript-eslint/no-empty-function": [
          "off"
        ],
        "@typescript-eslint/no-explicit-any": [
          "off"
        ],
        "@typescript-eslint/indent": "off",
        "prettier/prettier": [
          "error",
          {
            "singleQuote": true,
            "trailingComma": "all",
            "printWidth": 80,
            "tabWidth": 2,
            "useTabs": false,
            "jsxBracketSameLine": false
          }
        ]
      }
    },
    {
      "files": [
        "./src/components/**/*.{ts,tsx}"
      ],
      "rules": {
        "react/prop-types": "off"
      }
    },
    {
      "files": [
        "*.ts",
        "*.tsx",
        "*.js",
        "*.jsx"
      ],
      "rules": {}
    },
    {
      "files": [
        "*.ts",
        "*.tsx"
      ],
      "rules": {}
    },
    {
      "files": [
        "*.js",
        "*.jsx"
      ],
      "rules": {}
    }
  ]
}