Skip to content

refactor(desktop/js): replace var with const/let in remaining desktop modules#3323

Open
limad wants to merge 2 commits into
jeedom:developfrom
limad:refactor/var-to-const-desktop-others
Open

refactor(desktop/js): replace var with const/let in remaining desktop modules#3323
limad wants to merge 2 commits into
jeedom:developfrom
limad:refactor/var-to-const-desktop-others

Conversation

@limad
Copy link
Copy Markdown
Contributor

@limad limad commented May 7, 2026

Summary

Replace var with const/let in the remaining desktop/js modules not covered by previous PRs.

Modules: object, plugin, report, log, history, types, view_edit, view, overview, cron, editor, interact

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 object.js are tracked separately in #3318 (Lot 1).

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 remaining desktop modules (object, plugin, report, log, history, types, view_edit, view, overview, cron, editor, interact)

Test plan

  • Open Objects page, confirm object list loads and summary buttons work
  • Open Plugin management page, confirm plugin list loads
  • Open Report page, confirm report generation works
  • Open Logs page, confirm log display and search work
  • Open History page, confirm history graphs display
  • Open View and View edit pages, confirm views display correctly
  • Open Cron management page, confirm cron list loads
  • Open Timeline page, confirm timeline works (types.js)

Known risks

  • Minimal: block scoping verified, no hoisting dependencies found across 11 files

limad and others added 2 commits May 8, 2026 01:08
… modules

Modules: object, plugin, report, log, history, types, view_edit, view, overview, cron, editor, interact

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

No functional changes. Bug fixes for object.js are tracked separately in PR jeedom#3318.
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