Skip to content

refactor(desktop/js): replace var with const/let in scenario and timeline#3321

Open
limad wants to merge 1 commit into
jeedom:developfrom
limad:refactor/var-to-const-desktop-scenario
Open

refactor(desktop/js): replace var with const/let in scenario and timeline#3321
limad wants to merge 1 commit into
jeedom:developfrom
limad:refactor/var-to-const-desktop-scenario

Conversation

@limad
Copy link
Copy Markdown
Contributor

@limad limad commented May 7, 2026

Summary

Replace var with const/let in the scenario and timeline desktop/js modules.

Modules: scenario, timeline

Changes

  • All var declarations → const (not reassigned) or let (reassigned)
  • for (var x in/of ...)for (const x in/of ...)
  • for (var i = 0; ...)for (let i = 0; ...)

No functional changes. Bug fixes for scenario.js are tracked separately in #3319 (Lot 2).

Type of change

  • Refactor (no functional change)
  • Bug fix
  • New feature
  • Breaking change

Suggested changelog entry

- refactor(desktop/js): replace var with const/let in scenario and timeline

Test plan

  • Open a scenario, confirm loading, saving (Ctrl+S), undo/redo work
  • Test copy/paste of scenario elements
  • Test right-click context menus on elements
  • Open timeline page, confirm timeline displays correctly

Known risks

  • Minimal: block scoping verified, no hoisting dependencies found in scenario.js

…line

Modules: scenario, timeline

- Replace all `var` declarations with `const` (not reassigned) or `let` (reassigned)
- Convert `for (var x in ...)` to `for (const x in ...)`
- Convert `for (var i = 0; ...)` to `for (let i = 0; ...)`

No functional changes. Bug fixes for scenario.js are tracked separately in PR jeedom#3319.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant