deno/cli
David Sherret d1ef561dbf
feat: deno doc --lint (#21032)
Adds a new `--lint` flag to `deno doc` that surfaces three kinds of
diagnostics:

1. Diagnostic for non-exported type referenced in an exported type.
* Why? People often forget to export types from a module in TypeScript.
To supress this diagnostic, add an `@internal` jsdoc tag to the internal
type.
1. Diagnostic for missing return type or missing property type on a
**public** type.
* Why? Otherwise `deno doc` will not display good documentation. Adding
explicit types also helps with type checking performance.
1. Diagnostic for missing jsdoc on a **public** type.
* Why? Everything should be documented. This diagnostic can be supressed
by adding a jsdoc comment description.

If the lint passes, `deno doc` generates documentation as usual.

For example, checking for deno doc diagnostics on the CI:

```shellsession
$ deno doc --lint mod.ts second_entrypoint.ts > /dev/null
```

This feature is incredibly useful for library authors.

## Why not include this in `deno lint`?

1. The command needs the documenation output in order to figure out the
diagnostics.
1. `deno lint` doesn't understand where the entrypoints are. That's
critical for the diagnostics to be useful.
1. It's much more performant to do this while generating documentation.
1. There is precedence in rustdoc (ex. `#![warn(missing_docs)]`).

## Why not `--check`?

It is confusing with `deno run --check`, since that means to run type
checking (and confusing with `deno check --docs`).

## Output Future Improvement

The output is not ideal atm, but it's fine for a first pass. We will
improve it in the future.

Closes https://github.com/denoland/deno_lint/pull/972
Closes https://github.com/denoland/deno_lint/issues/970
Closes https://github.com/denoland/deno/issues/19356
2023-10-31 18:19:42 -04:00
..
args feat: deno doc --lint (#21032) 2023-10-31 18:19:42 -04:00
bench build: fix lsp benchmark (#20969) 2023-10-25 03:13:16 +00:00
cache refactor: break out ModuleInfoCache from ParsedSourceCache (#20977) 2023-10-25 18:13:22 -04:00
js feat(unstable): add Deno.jupyter.display API (#20819) 2023-10-12 22:32:38 +00:00
lsp perf(lsp): fix redundant walk when collecting tsc code lenses (#20974) 2023-10-25 21:51:02 +01:00
napi chore: forward v1.37.2 release commit to main (#20897) 2023-10-13 03:12:06 +00:00
npm fix(unstable/byonm): improve error messages (#20987) 2023-10-26 21:22:15 -04:00
ops refactor: migrate more ops to op2 macro (#20808) 2023-10-07 21:04:03 +05:30
schemas fix: add 'unstable' property to config json schema (#20984) 2023-10-26 22:11:24 +02:00
standalone feat: deno run --unstable-hmr (#20876) 2023-10-31 01:25:58 +01:00
tests feat: deno doc --lint (#21032) 2023-10-31 18:19:42 -04:00
tools feat: deno doc --lint (#21032) 2023-10-31 18:19:42 -04:00
tsc Revert "chore: update deno_std submodule (#20994)" (#21001) 2023-10-28 01:24:37 +00:00
util feat: deno run --unstable-hmr (#20876) 2023-10-31 01:25:58 +01:00
auth_tokens.rs chore: update base64 crate (#20877) 2023-10-26 18:39:04 +02:00
build.rs chore: update ext/kv to use denokv_* crates (#20986) 2023-10-31 11:13:57 +00:00
Cargo.toml refactor: update to deno_doc 0.71 (#21023) 2023-10-31 09:19:43 +05:30
deno.ico fix(cli): add icon and metadata to deno.exe on Windows (#6693) 2020-07-15 21:54:38 +02:00
deno_std.rs chore: forward v1.37.2 release commit to main (#20897) 2023-10-13 03:12:06 +00:00
emit.rs feat: deno run --unstable-hmr (#20876) 2023-10-31 01:25:58 +01:00
errors.rs refactor: upgrade to deno_ast 0.31 and deno_graph 0.59 (#20965) 2023-10-24 21:43:19 +00:00
factory.rs feat: deno run --unstable-hmr (#20876) 2023-10-31 01:25:58 +01:00
file_fetcher.rs feat: support import attributes (#20342) 2023-09-07 09:09:16 -04:00
graph_util.rs feat: deno run --unstable-hmr (#20876) 2023-10-31 01:25:58 +01:00
http_util.rs feat(unstable): add more options to Deno.createHttpClient (#17385) 2023-05-21 03:43:54 +02:00
js.rs build: allow disabling snapshots for dev (#20048) 2023-08-06 01:47:15 +02:00
main.rs fix: implement node:tty (#20892) 2023-10-30 15:53:08 +00:00
module_loader.rs refactor: break out ModuleInfoCache from ParsedSourceCache (#20977) 2023-10-25 18:13:22 -04:00
node.rs chore: rename some helpers on the Fs trait (#20097) 2023-08-08 16:28:18 -04:00
README.md docs(cli): do not need gen doc for cli (#17260) 2023-01-04 13:19:58 +01:00
resolver.rs fix(unstable/byonm): improve error messages (#20987) 2023-10-26 21:22:15 -04:00
version.rs refactor: make version and user_agent &'static str (#18400) 2023-03-23 23:27:58 +01:00
worker.rs feat: deno run --unstable-hmr (#20876) 2023-10-31 01:25:58 +01:00

Deno CLI Crate

crates

This provides the actual deno executable and the user-facing APIs.

The deno crate uses the deno_core to provide the executable.