The codebase currently contains function declarations inside blocks, which is discouraged due to inconsistent hoisting behavior across browsers. This can lead to confusing bugs and maintenance issues. Instead, function assignment expressions (function expressions) should be used within blocks to ensure predictable scoping and behavior.
Reference: avoid-function-declarations-in-blocks
Action Items:
- Identify all instances of function declarations inside blocks.
- Refactor these to use function assignment expressions instead.
- Ensure that all tests pass and that the refactoring does not introduce any regressions.
This will improve code quality and maintainability.
I created this issue for @Its4Nik from Its4Nik/DockStat#104 (comment).
Tips and commands
Getting Help
The codebase currently contains function declarations inside blocks, which is discouraged due to inconsistent hoisting behavior across browsers. This can lead to confusing bugs and maintenance issues. Instead, function assignment expressions (function expressions) should be used within blocks to ensure predictable scoping and behavior.
Reference: avoid-function-declarations-in-blocks
Action Items:
This will improve code quality and maintainability.
I created this issue for @Its4Nik from Its4Nik/DockStat#104 (comment).
Tips and commands
Getting Help