Get sanitizeDialog.js running in ESLint

RESOLVED FIXED in Firefox 55

Status

()

Firefox
General
RESOLVED FIXED
a month ago
23 days ago

People

(Reporter: standard8, Assigned: rajk, Mentored)

Tracking

unspecified
Firefox 55
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed)

Details

(Whiteboard: [lang=js])

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

a month ago
Once bug 1145735 is completed, sanitizeDialog.js will no longer be preprocessed, and can therefore be enabled for linting.

To enable checking of the file, remove the entry for it from the top-level `.eslintignore`.

Then you can run eslint on the file with

  ./mach eslint browser/base/content/sanitizeDialog.js

(note: eslint needs a one-time setup of `./mach eslint --setup`).

The errors listed in the output are the ones to be fixed.

Information about the eslint rules can be found here:

https://developer.mozilla.org/en-US/docs/ESLint
http://eslint.org/docs/rules/

If you are uncertain of how to fix a rule, please feel free to ask here or on irc (https://wiki.mozilla.org/Irc) in #eslint (I'm on as Standard8).
(Reporter)

Comment 1

a month ago
Note: I'll open this up as a mentored bug, once bug 1145735 is fixed.
Depends on: 1145735
(Reporter)

Updated

a month ago
Mentor: standard8@mozilla.com
Whiteboard: [lang=js]
(Assignee)

Comment 2

a month ago
can i take this one? I am new to Mozilla foundation.
(Reporter)

Comment 3

a month ago
Hi Rajesh, thank you for the offer. No one else has said they are working on it yet, so assigning to you.
Assignee: nobody → rajesh.kathiriya507
Comment hidden (mozreview-request)
(Reporter)

Updated

27 days ago
Attachment #8853093 - Flags: review?(standard8)
(Reporter)

Comment 5

26 days ago
mozreview-review
Comment on attachment 8853093 [details]
bug 1347642 - Fixed sanitizeDialog.js running in ESLint

https://reviewboard.mozilla.org/r/125176/#review127994

Hi Rajesh, thank you for posting the patch.

There's a couple of minor issues which just need an update, then I'll be able to give you r+ and this will be ready to land.

::: commit-message-3364c:1
(Diff revision 1)
> +bug 1347642 - Fixed sanitizeDialog.js running in ESLint r?Mark Banner

Reviewboard tends to run on the nicknames/aliases, so if you could change the end of this to 'r?Standard8' (no quotes) that will make it easier for landing.

Generally you can find these out by looking at people's names in bugzilla and looking for the colon before the nickname.

::: browser/base/content/sanitizeDialog.js:109
(Diff revision 1)
>  
>      try {
>        s.sanitize().then(null, Components.utils.reportError)
>                    .then(() => window.close())
>                    .then(null, Components.utils.reportError);
> +                  return false;

Can you fix the indent on this line, so that the 'r' is aligned with the first 's' of 's.sanitize()...' please?
Attachment #8853093 - Flags: review?(standard8)
Comment hidden (mozreview-request)
(Reporter)

Comment 7

24 days ago
mozreview-review
Comment on attachment 8853093 [details]
bug 1347642 - Fixed sanitizeDialog.js running in ESLint

https://reviewboard.mozilla.org/r/125176/#review128320

Rajesh, thank you for the updates, it all looks good now! So r=Standard8.

Normally at this stage you could ask someone to land it, or add the "checkin-needed" keyword for you. However, as it is in mozreview, I'll push the land button in a couple of minutes. The commit will land on our integration branch, then it'll get merged to mozilla-central (normally within about 24 hours). The bug will get marked as fixed when it lands in mozilla-central.
Attachment #8853093 - Flags: review?(standard8) → review+

Comment 8

24 days ago
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4cf4dd146988
Fixed sanitizeDialog.js running in ESLint r=standard8

Comment 9

23 days ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/4cf4dd146988
Status: NEW → RESOLVED
Last Resolved: 23 days ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
You need to log in before you can comment on or make changes to this bug.