Closed Bug 1556013 Opened 1 year ago Closed 1 year ago

Add prettier to the top-level eslint config

Categories

(Firefox Build System :: 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: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69

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.

You need to log in before you can comment on or make changes to this bug.