Skip to content

Track and resolve ESLint no-undef warnings for __DISTRIBUTION__ global #8281

@coderabbitai

Description

@coderabbitai

Problem

Multiple files require // eslint-disable-next-line no-undef comments when accessing the __DISTRIBUTION__ global variable, despite it being properly declared in src/platform/distribution/types.ts.

Current Occurrences

Files with eslint-disable comments:

  • src/App.vue (line 53)
  • src/components/custom/widget/WorkflowTemplateSelectorDialog.vue (line 432)

Context

__DISTRIBUTION__ is a Vite define constant that gets replaced at build time. While TypeScript recognizes the global declaration, ESLint's no-undef rule still flags it as undefined.

Potential Solutions

  1. Configure ESLint globals to recognize __DISTRIBUTION__ and other Vite defines
  2. Improve TypeScript type declarations to work better with ESLint
  3. Use a wrapper constant from src/platform/distribution/types.ts instead of direct global access
  4. Document the pattern if eslint-disable is the intended approach

Related

┆Issue is synchronized with this Notion page by Unito

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions