Closed Bug 1801529 Opened 3 years ago Closed 1 year ago

use eslint-plugin-jsdoc in Thunderbird code (like bug 1510561)

Categories

(Thunderbird :: General, enhancement)

enhancement

Tracking

(thunderbird_esr128 wontfix)

RESOLVED FIXED
109 Branch
Tracking Status
thunderbird_esr128 --- wontfix

People

(Reporter: mkmelin, Assigned: mkmelin)

References

Details

(Keywords: helpwanted)

Attachments

(3 files, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #1510561 +++

Use https://github.com/gajus/eslint-plugin-jsdoc

No longer blocks: 1510561
See Also: → 1510561
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Target Milestone: --- → 109 Branch

Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/bafa5ef68e1a
use eslint-plugin-jsdoc in mailnews/test/. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Plenty of work left to do here. If other people as well want to take on fixing up chunks of the code base that would be great.
How? Take some suitable size directory, add/change the .eslint.rc file like https://hg.mozilla.org/comm-central/diff/bafa5ef68e1ab977f5ba3f1180e7698a512099bb/mailnews/test/resources/.eslintrc.js#l1.8. Then run ../mach eslint --fix <dir> and go through the errors adjusting/adding type documentation for the functions. It's not hard, but pretty tedious work...

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → ASSIGNED

Ah nice, thanks for the heads up and info.
Should we share this in a couple of our mailing lists? Like tb-developers?

Yep, I'll send out a call and see if we could get someone interested.

This is the automatic fixes + whitespace fixup:

find . -type f -not -path "./suite/" -name ".js" -exec sed -i -E 's/* @returns +/* @returns /g' {} ;
find . -type f -not -path "./suite/" -name ".jsm" -exec sed -i -E 's/* @returns +/* @returns /g' {} ;

find . -type f -not -path "./suite/" -name ".js" -exec sed -i -E 's/* (@returns {.+}) +/* \1 /g' {} ;
find . -type f -not -path "./suite/" -name ".jsm" -exec sed -i -E 's/* (@returns {.+}) +/* \1 /g' {} ;

find . -type f -not -path "./suite/" -name ".js" -exec sed -i -E 's/*( @param)( \S+ \S+ ) +/\1\2- /g' {} ;
find . -type f -not -path "./suite/
" -name ".jsm" -exec sed -i -E 's/*( @param)( \S+ \S+ ) +/\1\2- /g' {} ;

find . -type f -not -path "./suite/" -name ".js" -exec sed -i -E 's/*( @param[^-])( - - )/\1 - /g' {} ;
find . -type f -not -path "./suite/" -name ".jsm" -exec sed -i -E 's/*( @param[^-])( - - )/\1 - /g' {} ;

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/a74696f86d12 mozilla/valid-jsdoc automatic fixups across the Thunderbird codebase. r=aleca
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/534b098204d0 small documentation improvement. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/7d4a6859eeb7 use eslint-plugin-jsdoc for mailnews/addrbook. r=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/6f6b36b28568 use eslint-plugin-jsdoc for mailnews/base/content. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/13e6128078c3 use eslint-plugin-jsdoc for mailnews/base/test. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/d1470f8f1fa5 use eslint-plugin-jsdoc for mailnews/base/prefs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/7be6ce5b7a78 Fix ABQueryUtils.jsm for eslint-plugin-jsdoc. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/4e10ded905be use eslint-plugin-jsdoc for mailnews/base/. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/38d054301e29 use eslint-plugin-jsdoc for mailnews/compose/. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/8bee010addb9 use eslint-plugin-jsdoc for mailnews/db/msgdb. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/cfee64616363 use eslint-plugin-jsdoc for mailnews/export. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/8b16f2740a9b Fix param documentation in MimeMessageEmitter.jsm, for eslint-plugin-jsdoc. rs=me
Pushed by brendan@thunderbird.net: https://hg.mozilla.org/comm-central/rev/cc8acead07bb Add missing jsdoc for restoreState in about3Pane.js. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/e8a7cd1b6004 Fix param doc for mailnews/db/gloda/test/unit/test_query_core.js. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/43bf9bf63f96 Fix param docs for mailnews/db/gloda/test/unit/test_msg_search.js. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/ed38c79d6908 Fix param docs for mailnews/db/gloda/test/unit/resources/GlodaTestHelperFunctions.jsm. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/f3ed489f8920 Fix param docs for mailnews/db/gloda/modules/Collection.jsm. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/7b9d2d37344a apply eslint-plugin-jsdoc formatting to mail/extensions/openpgp/content/. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/87c2b2d63a21 Fix param docs in mail/extensions/openpgp/content/ui/keyWizard.js. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/34b005530548 Fix param docs in mail/extensions/openpgp/content/ui/keyDetailsDlg.js. rs=me
See Also: → 1718998
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/35f6118a4b3b Fix jsdocs in zbase32.jsm. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/1650432fde3c Fix jsdocs in mail/extensions/openpgp/content/modules/wkdLookup.jsm. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/63592519735e Fix jsdocs in mail/extensions/openpgp/content/modules/fixExchangeMsg.jsm. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/5c342ce022f8 Make docs valid for eslint-plugin-jsdoc in trust.jsm and uris.jsm. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/1b235a26a2cb Make comments valid eslint-plugin-jsdoc in mail/extensions/openpgp/content/modules/sqliteDb.jsm. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/e223c580c99e use eslint-plugin-jsdoc for mail/extensions/openpgp/content/modules/keyObj.jsm. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/795f6c86c239 use eslint-plugin-jsdoc for mail/extensions/openpgp/content/modules/key.jsm. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/f7854b5e552d use eslint-plugin-jsdoc for mail/extensions/openpgp/content/modules/persistentCrypto.jsm. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/76a48901e920 use eslint-plugin-jsdoc for a bunch of calendar files. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/38df40cac35a use/fix eslint-plugin-jsdoc for some files in mail/extensions/openpgp/content/modules/. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/d810c836c906 Fix jsdocs for some parts of mail/extensions/openpgp/content/modules/. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/717e99adb1cd Fix jsdocs in mail/extensions/openpgp/content/modules/funcs.jsm. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/92be7cedf121 Fix jsdocs in mail/extensions/openpgp/content/modules/CollectedKeysDB.jsm. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/8382dcdee355 Fix jsdocs in mail/extensions/openpgp/content/modules/filtersWrapper.jsm. rs=me
Attachment #9388913 - Attachment is obsolete: true

Pushed by daniel@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/5aabddb56705
Fix all known JSDoc syntax errors in calendar/base/. r=mkmelin

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/11fee57bedf2 Fix jsdocs in mail/extensions/openpgp/content/modules/filters.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/a72d21d1359a Fix jsdocs in mail/extensions/openpgp/content/modules/cryptoAPI/RNPCryptoAPI.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/dae1b203991d Make decryption.sys.mjs pass for eslint-plugin-jsdoc. rs=me
Pushed by martin@humanoids.be: https://hg.mozilla.org/comm-central/rev/9ff490387b5e Enable mozilla/valid-jsdoc on chat imContentSink.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/546741981c7f Fix jsdocs and enable eslint-plugin-jsdoc for openpgp. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/e6f861ff3e52 Fix jsdocs and enable eslint-plugin-jsdoc for smime. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/16c2a1fb97e9 Fix some jsdocs to pass enabling eslint-plugin-jsdoc in mail/modules. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/170ab35654bf Fix jsdocs in SummaryFrameManager.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/5a275b0a6d1a Fix jsdocs in SessionStoreManager.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/44d660019d79 Fix jsdocs in PhishingDetector.sys.mjs and SmartMailboxUtils.sys.mjs. r=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/15c622826cd4 Fix jsdocs in MailUsageTelemetry.sys.mjs. r=me
Pushed by vineet@thunderbird.net: https://hg.mozilla.org/comm-central/rev/4f32ec2f7f1d Fix jsdocs in CreateInBackend.sys.mjs. r=me
Pushed by vineet@thunderbird.net: https://hg.mozilla.org/comm-central/rev/9605a97b8276 Fix jsdocs in CreateInBackend.sys.mjs. r=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/3e0a6967e41c Fix jsdocs in mail/modules/DNS.sys.mjs. r=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/ff4031ec4ca3 Fix jsdocs in mail/modules/DisplayNameUtils.sys.mjs. r=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/629edc2fd9d1 Fix jsdocs in mail/modules/MailUtils.sys.mjs. rs=me
Pushed by martin@humanoids.be: https://hg.mozilla.org/comm-central/rev/060368fde23d Enable valid-jsdoc linter on inappnotifications component. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/f44d67b269d8 Fix jsdoc comments in mail/modules/MailMigrator.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/580c84d5b649 Fix jsdoc comments in mail/modules/DisplayNameUtils.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/547ff73480d6 Fix jsdoc comments in mail/modules/SearchSpec.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/550bffaec934 Fix jsdoc comments in mail/modules/AttachmentInfo.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/ef0cef8f43f0 Fix jsdoc comments in mail/modules/CommandController.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/efa443156a14 Fix jsdoc comments in mail/modules/PluralForm.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/5ecd597d89d1 Fix jsdoc comments in mail/modules/ExtensionSupport.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/14a070d6f633 Fix jsdoc comments in mail/modules/GlobalPopupNotifications.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/bddc241fc3dd Fix jsdoc comments in mail/modules/DBViewWrapper.sys.mjs. rs=me
See Also: → 1914792
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/ba95fc5ff4f5 Enable eslint-plugin-jsdoc for mail/modules . rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/9e326fca926c eslint-plugin-jsdoc fixes for mailnews/. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/5d26dd4198c4 use eslint-plugin-jsdoc in mailnews/imap. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/1adc0e058b08 fix eslint-plugin-jsdoc in mailnews/local/test/unit/test_over4GBMailboxes.js. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/f73dafe60bf9 make jsdocs eslint-plugin-jsdoc valid for mailnews/db/gloda/modules/Facet.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/7cb0a58018bb Make jsdocs eslint-plugin-jsdoc valid in mailnews/import/content/aboutImport.js. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/3eb2553ae78c Make jsdocs eslint-plugin-jsdoc valid in mailnews/test/fakeserver/. r=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/88eab97d8d71 Make jsdocs eslint-plugin-jsdoc valid in mailnews/search/test/unit/test_quarantineFilterMove.js. r=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/9c88096a222b Fix jsdocs for a bunch of files in mailnews/. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/39f85b0590f4 Make jsdocs eslint-plugin-jsdoc valid for a bunch of files in mail/. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/cdf56a214191 use eslint-plugin-jsdoc for BuiltInThemes.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/4c0f73886471 fix jsdocs for some files in mail/test. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/67e7f26bb6c0 fix jsdocs for more files in mail/test. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/e18a487e3fdc fix jsdocs in mailnews/db/gloda/modules/Gloda.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/16cc393440da fix jsdocs in mailnews/db/gloda/test/unit/resources/GlodaTestHelper.sys.mjs. rs=me https://hg.mozilla.org/comm-central/rev/99a2a40bfcca fix jsdocs in mailnews/db/gloda/test/unit/resources/GlodaQueryHelper.sys.mjs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/6a4117de996a fix jsdocs in mailnews/db/gloda/. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/d168c0b00b36 Fix some jsdocs in calendar/. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/721c94f147bb Fix some misspellings in jsdocs. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/873448638cd4 Fix jsdocs in calendar, part 2; enable valid-jsdoc rule. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/dd70c3cb403a Fix some jsdocs in mail/. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/c359139e4304 Fix some jsdocs in mail/, part2; enable valid-jsdoc rule. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/5d189d6900a2 fix some jsdocs in EventUtils.sys.mjs. r=arschmitz
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/2e339b6d2a2b fix jsdocs in chat/; enable valid-jsdoc rule. rs=me
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/db17bbb508dc enable eslint-plugin-jsdoc plugin globally. rs=me

I think we're done \o/
Of course, lots of the jsdocs could be improved etc. but that will be for another bug.

Status: ASSIGNED → RESOLVED
Closed: 3 years ago1 year ago
Keywords: leave-open
Resolution: --- → FIXED
Regressions: 1948309

Parts affecting In-App Notifications were uplifted to ESR 128 in bug 1936307.

See Also: → 1979470
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: