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

RESOLVED FIXED in Firefox 56

Status

RESOLVED FIXED
2 years ago
3 months ago

People

(Reporter: standard8, Assigned: lyret, Mentored)

Tracking

3 Branch
mozilla56

Firefox Tracking Flags

(firefox56 fixed)

Details

(Whiteboard: [lang=js], URL)

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
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

Comment 1

2 years ago
Is it up for grabs? If yes, Where can I find the source code?
(Reporter)

Comment 2

2 years ago
(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 hidden (mozreview-request)
(Reporter)

Comment 4

2 years ago
mozreview-review
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+
(Reporter)

Updated

2 years ago
Assignee: nobody → lyret

Comment 5

2 years ago
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

Comment 6

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/34c157df46d2
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56

Updated

a year ago
Product: Testing → Firefox Build System
Keywords: good-first-bug
Version: Version 3 → 3 Branch
You need to log in before you can comment on or make changes to this bug.