Inspectopedia
 
2024.3

Scope function with nested forEach can be simplified

Info
New
Last modified: 03 December 2024

Reports forEach functions in the scope functions such as also or apply that can be simplified.

Convert forEach call to onEach quick-fix can be used to amend the code automatically.

Examples:

After the quick-fix is applied: