Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces ESLint-based linting (including CI) and applies a broad set of lint-driven cleanups, alongside fixing a bug where device brightness 0 was treated as “unset” and sent as full brightness.
Changes:
- Added ESLint (flat config) +
yarn lint, and a GitHub Actions workflow to run lint in CI. - Fixed MQTT device config publishing to correctly handle
brightness: 0. - Performed numerous lint-related refactors (remove unused vars/imports, small TS/TSX adjustments, config tweaks).
Reviewed changes
Copilot reviewed 24 out of 26 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents the new yarn lint command. |
| node_modules/.yarn-integrity | Adds a generated integrity file under a top-level node_modules directory (should not be committed). |
| app/yarn.lock | Updates lockfile for newly added ESLint-related dependencies. |
| app/vite.config.ts | Adds an ESLint suppression for a control-character regex used to strip ANSI codes. |
| app/ui/tsconfig.json | Excludes node_modules to reduce typecheck/lint noise. |
| app/ui/src/pages/SourcesPage.tsx | Removes unused connected from hook destructuring. |
| app/ui/src/pages/SettingsPage.tsx | Removes unused helper/config references as part of lint cleanup. |
| app/ui/src/components/PatchModal.tsx | Minor control-flow refactor to satisfy linting/style constraints. |
| app/ui/src/components/layout/sidebar/SidebarItem.tsx | Removes unused props interface. |
| app/ui/src/components/icons.tsx | Renames helper to _i to avoid unused-var lint errors. |
| app/ui/src/components/devices/DeviceEditPanel.tsx | Removes unused imports and dead code paths. |
| app/ui/src/api/BeaconApi.ts | Makes empty catch block explicit for linting. |
| app/tsconfig.json | Excludes UI and node_modules from backend tsconfig scope. |
| app/src/tally/types/DeviceTypes.ts | Exports previously-internal interfaces. |
| app/src/tally/TallyOrchestrator.ts | Prefixes unused param with _ to satisfy lint rules. |
| app/src/tally/TallyLifecycle.ts | Adjusts generic default type to avoid empty-object-type lint. |
| app/src/tally/producer/networkProducer/AtemNetClientTallyProducer.ts | Adds lint suppressions for intentionally empty interfaces; minor variable immutability change. |
| app/src/tally/consumer/networkConsumer/AedesNetworkConsumer.ts | Fixes brightness 0 handling; adds typed access to persistence; prefixes unused param. |
| app/src/tally/consumer/networkConsumer/AbstractNetworkConsumer.ts | Removes unused import. |
| app/src/tally/consumer/hardwareConsumer/RpiGpioHardwareConsumer.ts | Lint-driven comment/update; uses [] instead of new Array(). |
| app/src/tally/consumer/AbstractConsumer.ts | Prefixes unused param with _ to satisfy lint rules. |
| app/src/system/SystemInfoUtil.ts | Removes unused catch binding. |
| app/src/database/CoreDatabase.ts | Cleans up imports (type-only where appropriate). |
| app/package.json | Adds lint script + ESLint-related devDependencies. |
| app/eslint.config.js | Introduces ESLint flat config with TS + react-hooks rules. |
| .github/workflows/lint.yml | Adds CI lint workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+83
to
+88
| const persistence = (this.aedes as unknown as { persistence: { createRetainedStream(topic: string): NodeJS.ReadableStream; cleanRetained(topic: string, cb: () => void): void } }).persistence; | ||
| const stream = persistence.createRetainedStream('#'); | ||
| const clears: Promise<void>[] = []; | ||
| stream.on('data', (packet: { topic: string }) => { | ||
| clears.push(new Promise<void>((res) => | ||
| this.aedes.persistence.cleanRetained(packet.topic, () => res()) | ||
| persistence.cleanRetained(packet.topic, () => res()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.