Closed Bug 1795602 Opened 2 years ago Closed 2 years ago

Stop using the 'with' statement in dom/

Categories

(Core :: Web Audio, task)

task

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: standard8, Assigned: standard8)

Details

Attachments

(1 file)

The JavaScript with statement is potentially problematic because it adds members of an object to the current scope, which makes it difficult to tell what variable inside the block actually refers to.

It also makes it difficult for ESLint to figure out the allowed variables inside the block.

The no-with ESLint rule is already enabled for most of the tree, so I'd like to extend it to dom/ to cover the three instances remaining there (two of which are in web audio).

Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/396bc77733c4 Stop using the 'with' statement in dom/. r=padenot
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: