Closed Bug 1374671 Opened 7 years ago Closed 7 years ago

Enable the ESLint no-whitespace-before-property rule across mozilla-central

Categories

(Developer Infrastructure :: Lint and Formatting, enhancement)

3 Branch
enhancement
Not set
normal

Tracking

(firefox56 fixed)

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: standard8, Assigned: lyret, Mentored)

References

()

Details

(Whiteboard: [lang=js])

Attachments

(1 file)

We currently have no-whitespace-before-property enabled for a few directories, but we should expand it to the whole of the repository.

I'm happy to mentor this bug. There's background on our eslint setups here:

https://developer.mozilla.org/docs/ESLint

Also, details of the rule: http://eslint.org/docs/rules/no-whitespace-before-property

Here's some approximate steps:

- Add a no-whitespace-before-property (error) line in recommended.js.
- Remove the no-whitespace-before-property related lines in the existing .eslintrc.js configs (apart from devtools/):

https://dxr.mozilla.org/mozilla-central/search?q=no-whitespace-before-property&redirect=false

- Run eslint for fixing:

./mach eslint --fix

This should fix most/all of the instances.

- Fix any remaining instances by hand
- Inspect the diff to make sure that the indentation of the lines surrounding the changes look ok.
- Create a commit and push it to mozreview:

http://mozilla-version-control-tools.readthedocs.io/en/latest/mozreview.html
Is it up for grabs? If yes, Where can I find the source code?
(In reply to nimesh3536 from comment #1)
> Is it up for grabs? If yes, Where can I find the source code?

Yes it is. You might want to build Firefox first so that you've got all the source code and can test things out if necessary. Here's information on how to do that:

https://developer.mozilla.org/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_build
Comment on attachment 8891153 [details]
Bug 1374671 - Enable the ESLint no-whitespace-before-property rule across mozilla-central.

https://reviewboard.mozilla.org/r/162344/#review168092

Looks great, thank you for the patch.
Attachment #8891153 - Flags: review?(standard8) → review+
Assignee: nobody → lyret
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/34c157df46d2
Enable the ESLint no-whitespace-before-property rule across mozilla-central. r=standard8
https://hg.mozilla.org/mozilla-central/rev/34c157df46d2
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Product: Testing → Firefox Build System
Keywords: good-first-bug
Version: Version 3 → 3 Branch
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.