Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

1.9 KB
Raw Blame
import js from '@eslint/js'
import tseslint from 'typescript-eslint'
import reactHooks from 'eslint-plugin-react-hooks'
import globals from 'globals'

export default tseslint.config(
  {
    ignores: [
      'dist/**',
      'out/**',
      'node_modules/**',
      'resources/**',
      'api/**',
      'arch/**',
      'docs/**',
      '**/*.test.mjs'
    ]
  },
  js.configs.recommended,
  ...tseslint.configs.recommended,
  // The renderer is React running in a browser environment.
  {
    files: ['src/**/*.{ts,tsx}'],
    plugins: { 'react-hooks': reactHooks },
    languageOptions: {
      globals: { ...globals.browser }
    },
    rules: {
      // Proven, high-value hook rules. The v7 "recommended" set adds many
      // opinionated React-Compiler-era rules that flood a legacy codebase.
      'react-hooks/rules-of-hooks': 'error',
      'react-hooks/exhaustive-deps': 'warn'
    }
  },
  // Main / preload / scripts (Node environment)
  {
    files: ['electron/**/*.{ts,mts,mjs}', 'scripts/**/*.{js,mjs,cjs}', 'tools/**/*.{ts,mjs}'],
    languageOptions: {
      globals: { ...globals.node }
    }
  },
  // CommonJS files (Node, require/module)
  {
    files: ['scripts/**/*.{js,cjs}', 'tailwind.config.js', 'postcss.config.js', '**/*.cjs'],
    languageOptions: {
      sourceType: 'commonjs',
      globals: { ...globals.node }
    }
  },
  // Project-wide rule tuning
  {
    rules: {
      '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
      '@typescript-eslint/no-explicit-any': 'off',
      // require() is used intentionally in Electron main and Node build scripts
      '@typescript-eslint/no-require-imports': 'off',
      '@typescript-eslint/no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
      // Stripping ANSI escape codes requires control chars in regex
      'no-control-regex': 'off',
      'no-empty': ['warn', { allowEmptyCatch: true }]
    }
  }
)