reporters.ts docstring claims a 'fileExtension' static and a 'create(basePath)' factory that no reporter implements
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- documentation
Research direction
Start in src/reporters.ts by reading the Reporter interface docstring, reporterConstructors map, and the YamlReporter and JsonlReporter implementations. Update the documentation so it matches the registered factory shape and does not claim an unused fileExtension; confirm the documented statics align with both reference reporters.
Written by the indexing model from the issue text.
Description
Observed behavior
The Reporter interface docstring in src/reporters.ts tells extension authors to add three statics:
/**
* To create a custom reporter:
*
* 1. Create a class that implements this interface.
* 2. Add a static `reporterName` string, a static `fileExtension` string,
* and a static async `create(basePath)` factory method.
* 3. Register it in the `reporterConstructors` map in this file.
*
* See `YamlReporter` and `JsonlReporter` for reference implementations.
*/
Neither reference reporter follows that recipe:
YamlReporterandJsonlReporteronly definereporterName; there is nofileExtensionstatic, and the runtime never reads one.createtakes aReporterConfig({ outputDir, jobName }), not abasePathstring. The file extension is hard-coded inside eachcreate(-report.yaml,-report.jsonl).
A third-party author following the docstring will write code that compiles but is inconsistent with the registered shape, and they will not understand where the supposed fileExtension is consumed.
Expected behavior
The docstring should describe the shape that reporterConstructors actually expects:
- A static
reporterName: string - A static
create(config: ReporterConfig): Promise<Reporter>factory
Either remove the fileExtension mention or actually introduce the field (for example to drive a default filename in createReporter).
Suggested fix
Update the JSDoc in src/reporters.ts to:
2. Add a static `reporterName` string and a static async
`create(config: ReporterConfig)` factory method.
If fileExtension is wanted as part of the contract, introduce it on YamlReporter and JsonlReporter and have create use it when constructing the report path; otherwise drop it from the docstring.
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from joewalker/loop-the-loop
-
bug S4
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
joewalker/loop-the-loop#88 ·
-
Git exec(): child killed by a signal rejects with new Error('') and loses the signal information Openbug S3
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
joewalker/loop-the-loop#84 ·
-
bug S3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
joewalker/loop-the-loop#83 ·
-
bug S3
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
joewalker/loop-the-loop#82 ·
-
bug S4
Difficulty 1/5 Under an hour Newbie friendliness 90/100
joewalker/loop-the-loop#79 ·
All issues in joewalker/loop-the-loop
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100