Get sanitizeDialog.js running in ESLint

RESOLVED FIXED in Firefox 55



5 months ago
5 months ago


(Reporter: standard8, Assigned: rajk, Mentored)


Firefox 55
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed)


(Whiteboard: [lang=js])

MozReview Requests


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


(1 attachment)

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:

If you are uncertain of how to fix a rule, please feel free to ask here or on irc ( in #eslint (I'm on as Standard8).
Note: I'll open this up as a mentored bug, once bug 1145735 is fixed.
Depends on: 1145735
Whiteboard: [lang=js]

Comment 2

5 months ago
can i take this one? I am new to Mozilla foundation.
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)
Attachment #8853093 - Flags: review?(standard8)

Comment 5

5 months ago
Comment on attachment 8853093 [details]
bug 1347642 - Fixed sanitizeDialog.js running in ESLint

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)

Comment 7

5 months ago
Comment on attachment 8853093 [details]
bug 1347642 - Fixed sanitizeDialog.js running in ESLint

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

5 months ago
Pushed by
Fixed sanitizeDialog.js running in ESLint r=standard8

Comment 9

5 months ago
Last Resolved: 5 months 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.