Closed Bug 1347642 Opened 7 years ago Closed 7 years ago

Get sanitizeDialog.js running in ESLint


(Firefox :: General, defect)

Not set



Firefox 55
Tracking Status
firefox55 --- fixed


(Reporter: standard8, Assigned: rajk, Mentored)



(Whiteboard: [lang=js])


(1 file)

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
Mentor: standard8
Whiteboard: [lang=js]
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
Attachment #8853093 - Flags: review?(standard8)
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 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+
Pushed by
Fixed sanitizeDialog.js running in ESLint r=standard8
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
You need to log in before you can comment on or make changes to this bug.