From 137f1a0c6836b50292c53e15aa85bd56ad14a943 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Tue, 23 Jan 2024 16:37:43 +0100 Subject: feat(cli): improved diagnostics printing (#22049) This initially uses the new diagnostic printer in `deno lint`, `deno doc` and `deno publish`. In the limit we should also update `deno check` to use this printer. --- .../testdata/doc/referenced_private_types_lint.out | 30 ++++++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'cli/tests/testdata/doc') diff --git a/cli/tests/testdata/doc/referenced_private_types_lint.out b/cli/tests/testdata/doc/referenced_private_types_lint.out index 54f225059..328435cd7 100644 --- a/cli/tests/testdata/doc/referenced_private_types_lint.out +++ b/cli/tests/testdata/doc/referenced_private_types_lint.out @@ -1,8 +1,28 @@ -Missing JSDoc comment. - at file:///[WILDCARD]/referenced_private_types.ts:5:1 +error[missing-jsdoc]: exported symbol is missing JSDoc documentation + --> [WILDCARD]:5:1 + | +5 | export class MyClass { + | ^ + + +error[private-type-ref]: public type 'MyClass.prototype.prop' references private type 'MyInterface' + --> [WILDCARD]:6:3 + | +6 | prop: MyInterface = {}; + | ^ + = hint: make the referenced type public or remove the reference + | +1 | interface MyInterface { + | - this is the referenced type + + info: to ensure documentation is complete all types that are exposed in the public API must be public + + +error[missing-jsdoc]: exported symbol is missing JSDoc documentation + --> [WILDCARD]:6:3 + | +6 | prop: MyInterface = {}; + | ^ -Type 'MyClass.prototype.prop' references type 'MyInterface' which is not exported from a root module. -Missing JSDoc comment. - at file:///[WILDCARD]/referenced_private_types.ts:6:3 error: Found 3 documentation lint errors. -- cgit v1.2.3