Closed Bug 1556013 Opened 6 years ago Closed 6 years ago

Add prettier to the top-level eslint config

Categories

(Developer Infrastructure :: Lint and Formatting, task)

task
Not set
normal

Tracking

(firefox69 fixed)

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: vporof, Assigned: vporof)

References

Details

Attachments

(1 file)

This is a preliminary stop-gap before turning it on by default early July.

Everything is ignored except the debugger.

This has the advantage of allowing folks to check out what ./mach lint --fix does for them, and manually whitelist sources in the meantime if needed.

Summary: Add prettier to the top-level aslant config → Add prettier to the top-level eslint config
Pushed by vporof@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/894a44c47272 Add prettier to the top-level eslint config, r=Standard8
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Assignee: nobody → vporof

This rule makes awful recommendations. It tells me to to do things like change:

if (some.veryLongString.ofConditional(stuff))
  return false;

to:

if (some.veryLongString.ofConditional(stuff)) return false;

Which, granted, isn't a problem for most of the tree which requires braces around conditionals, but I find code with conditionals written on a single line, particularly when they contain flow control statements, extremely hard to follow...

We plan to continue using "curly": ["error", "all"] with eslint, which can coexist with Prettier and require braces around conditionals.

Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: