Closed
Bug 2089817
Opened 25 days ago
Closed 4 days ago
Add a mach ts command to measure how much of each module its JSDoc types
Categories
(Developer Infrastructure :: Linting and Formatting: JavaScript, enhancement)
Developer Infrastructure
Linting and Formatting: JavaScript
Tracking
(firefox163 fixed)
RESOLVED
FIXED
163 Branch
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: dao, Assigned: dao)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
With noImplicitAny off, a parameter without a JSDoc type is silently any, so a low tsc error count can mean little of the code is checked. Before enabling TypeScript for a directory, or quoting its error count, it helps to know how much of each module its JSDoc types.
./mach ts coverage <path>… prints, for each .js or .mjs module directly in a directory (or each file given), how many functions have a JSDoc comment and how many parameters tsc can type, with totals; --list names each function with an untyped parameter. It moves the typescript-rollout agent skill's bundled script (bug 2089016) into tools/ts, beside ./mach ts summary (bug 2089610), and enabling.md names it where it explains what a low error count can hide.
| Assignee | ||
Comment 1•25 days ago
|
||
Updated•25 days ago
|
Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Updated•7 days ago
|
Component: Lint and Formatting → Linting and Formatting: JavaScript
Pushed by dgottwald@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/f302777fde80
https://hg.mozilla.org/integration/autoland/rev/ba1f863d658e
Add mach ts coverage to measure how much of each module its JSDoc types. r=Standard8
Comment 3•4 days ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 4 days ago
status-firefox163:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•