1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-30 16:40:57 -05:00
denoland-deno/cli/tests/integration
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
..
bench_tests.rs test(bench): mark explicit timer test as flaky (#20304) 2023-08-27 22:22:23 +02:00
bundle_tests.rs feat(cli): --ext parameter for run, compile, and bundle (#17172) 2023-03-22 10:15:53 -04:00
cache_tests.rs chore(tests): test_util - Add PathRef (#19450) 2023-06-10 11:09:45 -04:00
cert_tests.rs feat(unstable): ability to npm install then deno run main.ts (#20967) 2023-10-25 14:39:00 -04:00
check_tests.rs feat(unstable): package manager (#20517) 2023-09-18 10:46:44 -04:00
compile_tests.rs Revert "chore: update deno_std submodule (#20994)" (#21001) 2023-10-28 01:24:37 +00:00
coverage_tests.rs fix: exclude internal JS files from coverage (#20448) 2023-09-11 13:53:42 +00:00
doc_tests.rs feat: deno doc --lint (#21032) 2023-10-31 18:19:42 -04:00
eval_tests.rs tests: move integration tests to a single module (#17380) 2023-01-13 02:59:13 +01:00
flags_tests.rs chore: Remove 'UNSTABLE:' from 'deno compile' help (#21003) 2023-10-28 01:54:52 +00:00
fmt_tests.rs chore: update to Rust 1.72 (#20258) 2023-08-26 22:04:12 -06:00
info_tests.rs feat(unstable): package manager (#20517) 2023-09-18 10:46:44 -04:00
init_tests.rs fix(init): skip existing files instead of erroring (#20434) 2023-09-12 12:55:26 +02:00
inspector_tests.rs refactor: rewrite ext/io, ext/webstorage ops to op2 (#20461) 2023-09-12 12:42:05 +02:00
install_tests.rs chore(tests): test_util - Add PathRef (#19450) 2023-06-10 11:09:45 -04:00
js_unit_tests.rs feat(ext/websocket): split websocket read/write halves (#20579) 2023-10-30 11:49:19 -06:00
jsr_tests.rs feat(unstable): package manager (#20517) 2023-09-18 10:46:44 -04:00
lint_tests.rs chore: update to Rust 1.72 (#20258) 2023-08-26 22:04:12 -06:00
lsp_tests.rs perf(lsp): cleanup workspace settings scopes (#20937) 2023-10-24 21:27:27 +01:00
mod.rs feat(unstable): package manager (#20517) 2023-09-18 10:46:44 -04:00
node_compat_tests.rs chore(cli): use NPM_CONFIG_REGISTRY for all tests (#20320) 2023-08-29 13:02:54 -06:00
node_unit_tests.rs fix(ext/node): don't call undefined nextTick fn (#20724) 2023-10-02 14:13:57 +02:00
npm_tests.rs fix(unstable/byonm): improve error messages (#20987) 2023-10-26 21:22:15 -04:00
repl_tests.rs feat(jupyter): support Deno.test() (#20778) 2023-10-05 21:45:11 +01:00
run_tests.rs feat(unstable): allow bare specifier for builtin node module (#20728) 2023-10-20 13:02:08 +09:00
shared_library_tests.rs chore: update macOS shared library test (#21031) 2023-10-31 17:39:07 +00:00
task_tests.rs fix(npm): run pre and post tasks if present (#19178) 2023-05-18 15:51:17 -04:00
test_tests.rs fix(test): share fail fast tracker between threads (#20515) 2023-09-15 15:46:48 +00:00
upgrade_tests.rs chore(tests): test_util - Add PathRef (#19450) 2023-06-10 11:09:45 -04:00
vendor_tests.rs feat(vendor): support for npm specifiers (#19186) 2023-05-19 22:39:27 +00:00
watcher_tests.rs feat: deno run --unstable-hmr (#20876) 2023-10-31 01:25:58 +01:00
worker_tests.rs fix: regression in workers using dynamic imports (#20006) 2023-08-02 01:19:44 +00:00