import shared from '../../eslint.config.shared.mjs' import globals from 'globals' export default [ ...shared, { // Desktop is an Electron renderer — it legitimately uses browser globals // (window, document, etc). Re-add them here; the shared config omits // globals.browser so terminal-only workspaces (ui-tui) don't get them. files: ['**/*.{ts,tsx}'], languageOptions: { globals: { ...globals.browser, ...globals.node } } }, { // THE PLUGIN FENCE: plugins speak @hermes/plugin-sdk (+ react), never `@/…` // internals — the same isolation a runtime-fetched published plugin gets, // enforced on bundled ones so the SDK surface stays honest and sufficient. files: ['src/plugins/**/*.{ts,tsx}'], rules: { 'no-restricted-imports': [ 'error', { patterns: [ { group: ['@/*', '../*', '@hermes/shared'], message: 'Plugins import only @hermes/plugin-sdk (and react). Missing something? Add it to the SDK.' } ] } ] } }, { files: ['**/*.test.tsx'], rules: { 'no-restricted-globals': ['warn', 'document'] } } ]