Closed
Bug 1250205
Opened 8 years ago
Closed 8 years ago
Fix eslint warnings in devtools/client/inspector/markup/markup.js
Categories
(DevTools :: Inspector, defect, P1)
DevTools
Inspector
Tracking
(firefox47 fixed)
RESOLVED
FIXED
Firefox 47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: pbro, Assigned: pbro)
References
Details
Attachments
(1 file)
667:15 warning "prev" is already declared in the upper scope no-shadow 680:15 warning "next" is already declared in the upper scope no-shadow 958:25 warning "added" is already declared in the upper scope no-shadow 1504:1 warning Line 1504 exceeds the maximum line length of 80 max-len 1519:13 warning "container" is already declared in the upper scope no-shadow 2870:14 warning "val" is already declared in the upper scope no-shadow 2910:17 warning "name" is already declared in the upper scope no-shadow These seem to confuse people when looking at logs. I think we should, anyway, change all warnings to errors and get rid of them all (see bug 1246904). But in the meantime, let's use this bug to get rid of the warnings.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → pbrosset
Status: NEW → ASSIGNED
Priority: -- → P1
Assignee | ||
Comment 1•8 years ago
|
||
So, ESLint no-shadow rule complains about this: switch (something) { case "foo": let a = 1; break; case "bar": let a = 2; break; } The second 'a' variable is reported as already declared in the upper scope. This is a bit weird, but I guess I can simply declare a single variable outside of the switch.
Assignee | ||
Comment 2•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/35861/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/35861/
Attachment #8722092 -
Flags: review?(mratcliffe)
Attachment #8722092 -
Flags: review?(mratcliffe) → review+
Comment on attachment 8722092 [details] MozReview Request: Bug 1250205 - Clean remaining eslint warnings in devtools/client/inspector/markup/markup.js; r=miker https://reviewboard.mozilla.org/r/35861/#review32591 (In reply to Patrick Brosset [:pbrosset] [:pbro] from comment #1) > So, ESLint no-shadow rule complains about this: > > switch (something) { > case "foo": > let a = 1; > break; > case "bar": > let a = 2; > break; > } > > The second 'a' variable is reported as already declared in the upper scope. > This is a bit weird, but I guess I can simply declare a single variable > outside of the switch. Yup, the scope in a switch is the space between one curly brace and another but people tend to think that each case has it's own scope. Anyhow, an easy r+
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 4•8 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/cad377e8dffc
Comment 5•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cad377e8dffc
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Assignee | ||
Updated•8 years ago
|
Blocks: devtools-eslint
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•