Closed Bug 1578477 Opened 6 years ago Closed 6 years ago

Port Prettier JavaScript formatting changes to comm-esr68

Categories

(Thunderbird :: General, task, P3)

task

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 68.0

People

(Reporter: pmorris, Assigned: pmorris)

References

Details

Attachments

(2 files)

Now that the Prettier JavaScript formatting has landed on trunk (see meta bug 1572047), port those changes to comm-esr68 to make back-porting bug fixes go smoothly.

I've backported all I needed for TB 68.1 (hopefully). These are the remaining uplifts for TB 68.2: https://mzl.la/2Q0pIrk

Some may come from the pre-prettier era, some after. I'll see what applies now and then we can reformat.

OK, I've backported what was from the pre-prettier era apart from these bugs:

Bug 1544793 win.window.gBrowser is undefined Thunderbird Add-Ons: Extensions geoff@thunderbird.net
Bug 1575708 Message display API Thunderbird Add-Ons: Extensions geoff@thunderbird.net
Bug 1575710 Window API should handle other types of windows Thunderbird Add-Ons: Extensions geoff@thunderbird.
Bug 1575046 Support pasting lists of addresses into mailing list dialogs Thunderbird Address Book paul@thunderbird.net

Please coordinate with Geoff (and yourself/Paul) whether these will be rebased before doing Prettier or after. Note that bug 1575708 almost applies to pre-Prettier but it might depend on bug 1575710.

Scrap that, I got confused. The first three bugs in comment #2 have prettified patches already. Bug 1575046 has landed on c-esr68 now.

So you can start the ball rolling on Prettier for c-esr68.

Here's the try server run: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=6057deceafdde2c738ef5a173ae10cfacda767b9
In an email Jorg said that he can get the patches from the try run to avoid having to upload all of them to this bug manually.

I've ported all the relevant patches to esr68, fixing merge conflicts as needed. For the auto-formatting patches I didn't actually apply them directly, but rather recreated them by doing the steps to do the automated formatting, as described in the commit messages.

This includes the relevant patches from: bug 1573670, bug 1577606, bug 1577835, and bug 1579200. The part3 patch from bug 1573670 was not needed on esr68.

I added a couple of additional commits to add curly blocks to XBL binding (.xml) files that are not yet converted to custom elements on esr68:

  • Fix more "curly" eslint errors in xml files in mail/
  • Fix more "curly" eslint errors in xml files in mailnews/

Since those two are new it would be good to review them before landing. I'll upload the patches for those two and request review for them.

Adds curly braces to if, else, while, for, etc. in .xml files in mail/
I'll take any review by any reviewer.

Attachment #9093328 - Flags: review?(mkmelin+mozilla)
Attachment #9093328 - Flags: review?(jorgk)

Adds curly braces to if, else, while, for, etc. in .xml files in mailnews/
I'll take any review by any reviewer.

Note I added the curly brackets in these patches manually. Eslint knew how to complain if they weren't there, but not how to add them with |--fix| because the code was in .xml files. (Good riddance to XBL...)

Attachment #9093331 - Flags: review?(mkmelin+mozilla)
Attachment #9093331 - Flags: review?(jorgk)

I forgot that Jorg had made a few edits (basically replacing |i -= 1| with |i--| in the for loop commits). So for this work I used the patches that I uploaded rather than the edited ones that he landed.

I've now gone back and redone those edits Jorg made, amending the for loop commits. Here is the new try server run:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=1760d461f07468b737b5f31dc444c2024114d2aa

Attachment #9093328 - Flags: review?(mkmelin+mozilla)
Attachment #9093328 - Flags: review?(jorgk)
Attachment #9093328 - Flags: review+
Attachment #9093331 - Flags: review?(mkmelin+mozilla)
Attachment #9093331 - Flags: review?(jorgk)
Attachment #9093331 - Flags: review+

Pushed 35 changesets: https://hg.mozilla.org/releases/comm-esr68/pushloghtml?changeset=614d0bcb7faa0411b5c5ba66fcf88efa95e80fa1

614d0bcb7faa0411b5c5ba66fcf88efa95e80fa1 Paul Morris — Bug 1578477 - Reformat the .eslintrc.js files with Prettier. r=mkmelin a=jorgk default tip
0402a2b308d4d99f9a995f3d4241cbc66de6c09e Paul Morris — Bug 1578477 - Fix 'function and comments' formatting in mailnews/. r=mkmelin
af3c77c4305bf5f69eb9600cb10c852a975020e4 Paul Morris — Bug 1578477 - Fix 'if and comments' formatting in mailnews/. r=mkmelin
6feb29f934a8d10abb2bdeb4ff07d8344f6789a1 Paul Morris — Bug 1578477 - Fix 'else and comments' formatting in mailnews/. r=mkmelin
565f9e31dddb69dca86de4b18f1a3e35061c62f9 Paul Morris — Bug 1578477 - Fix more "curly" eslint errors in xml files in mailnews/. r=mkmelin
0931fd184cd1bfa59fc7bc1eef0a812931039778 Paul Morris — Bug 1578477 - Fix eslint "no-useless-concat" errors in mailnews/. r=mkmelin
b0f9d66813e423b0ee5141759608a29b1d02bc97 Paul Morris — Bug 1578477 - Rewrite atypical for loops in mailnews/ for Prettier. r=mkmelin
c7f5066772f3236a0d660b68c3a20da6ffe62675 Paul Morris — Bug 1578477 - Reformat mailnews/ code with eslint and Prettier. r=mkmelin
0111a56e22d53bdc386a787dc55ad5b8abe555b1 Paul Morris — Bug 1578477 - Fix 'if and comments' formatting in mail/. r=mkmelin
bf35c148e071e4a845a81fa28e624726daa9971d Paul Morris — Bug 1578477 - Fix 'else and comments' formatting in mail/. r=mkmelin
59e62fc20c618805dda90d487c6f97a8f68dc06f Paul Morris — Bug 1578477 - Fix more "curly" eslint errors in xml files in mail/. r=mkmelin
90e598c97d53c7c3a0d96117edfa869bebd0be76 Paul Morris — Bug 1578477 - Fix eslint "no-useless-concat" errors in mail/. r=mkmelin
52ce72ba7f91f070e6a967279268fcdf973edfb5 Paul Morris — Bug 1578477 - Fix location of 'eslint-disable-' comments in mail/. r=mkmelin
a2ce43052c073f2fab235b4d5696ea8a8e0881c9 Paul Morris — Bug 1578477 - Rewrite atypical for loops in mail/ for Prettier. r=mkmelin
b5a3fb6abb20147b86c97515b9a7991b132b09da Paul Morris — Bug 1578477 - Fix "curly" eslint errors in xul files in mail/. r=mkmelin
f9486202905d9c293f0cf3476373959ab05b037e Paul Morris — Bug 1578477 - Reformat mail/ code with eslint and Prettier. r=mkmelin
939516bd49c3065b29b529de2cf5d6686978cf22 Paul Morris — Bug 1578477 - Fix 'if, else, and comments' formatting in editor/. r=mkmelin
677b854970c7587fedd75bf489b8e3cd598783ac Paul Morris — Bug 1578477 - Fix remaining linting errors in editor/. r=mkmelin
af32614b1c6e4ebcdceb17f76864852b9937c0b7 Paul Morris — Bug 1578477 - Reformat editor/ code with eslint and Prettier. r=mkmelin
b6b269360a9bc4c75a6692c98fdcde406570d8a8 Paul Morris — Bug 1578477 - Reformat common/ and ldap/ code. r=mkmelin
8d7f85f21dbf9083acf4bafc5e99569f5957dd9c Paul Morris — Bug 1578477 - Remove "eslint-disable key-spacing" lines from xmpp-xml.jsm. r=clokep
0c543527ce5c21d8afbc9ee4c5fb3ef94484f00f Paul Morris — Bug 1578477 - Remove now unneeded chat/.eslintrc.js file. r=mkmelin
2635ac7d1dd58391c8a79ef01b879196fdac372c Paul Morris — Bug 1578477 - Fix 'if, else, comments', other formatting in chat/. r=mkmelin
a10aa3c4d42ec477f1cb849e7a8b1737b766e273 Paul Morris — Bug 1578477 - Fix remaining linting errors in chat/. r=mkmelin
fda8338f7b7782a9a2ffcc8e260290395b055858 Paul Morris — Bug 1578477 - Reformat chat/ code with eslint and Prettier. r=mkmelin
965f71365127b245d89ca44690673529e3450635 Paul Morris — Bug 1578477 - Adjust eslint config for reformatting. r=mkmelin
8bff1ad4eda90ec854fc9cf8981ca07161e2fb76 Paul Morris — Bug 1578477 - Wrap all Thunderbird custom elements in curly bracket blocks. r=mkmelin
bc5321062f64c9104c0bfc65466e1ab894d91169 Paul Morris — Bug 1578477 - Edit a for loop to satisfy Prettier. r=darktrojan
0e5b4822aa490222697d8b8b6305f5130f1088b9 Paul Morris — Bug 1578477 - Improve some unfortunate auto-formatting. r=darktrojan
77215176c0c850eb6831fb1ae60b6eecfbd68c55 Paul Morris — Bug 1578477 - Fix 'no-useless-concat' eslint errors. r=darktrojan
cbc557dd979c8295100cb5043088704445fb100a Paul Morris — Bug 1578477 - Reposition 'eslint-disable-' comments so they work. r=darktrojan
e26f09931c2ca01395588070dee9ea6322df972f Paul Morris — Bug 1578477 - Reformat calendar code with eslint and Prettier. r=darktrojan
c16d4daaefc925a2604ede93f18b91223e8235bc Paul Morris — Bug 1578477 - Adjust eslint and prettier config for reformatting. r=darktrojan
312d6fbc6bc7ef8426569e553097e6ce508cb486 Paul Morris — Bug 1578477 - Turn on Prettier but ignore all directories. r=darktrojan
6f49485a894c9d32ec9eca31ac16dc7f164f51f9 Paul Morris — Bug 1578477 - Wrap all calendar custom elements in curly bracket blocks. r=darktrojan,mkmelin

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: