-
Notifications
You must be signed in to change notification settings - Fork 658
chore: docs lint plugin #6832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
chore: docs lint plugin #6832
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6832 +/- ##
=======================================
Coverage 94.16% 94.17%
=======================================
Files 573 574 +1
Lines 42425 42453 +28
Branches 6739 6741 +2
=======================================
+ Hits 39951 39980 +29
+ Misses 2424 2423 -1
Partials 50 50 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
// This module is browser compatible. | ||
|
||
import type { Uint8Array_ } from "./_types.ts"; | ||
// deno-lint-ignore deno-std-docs/exported-symbol-documented |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could have this rule ignore re-exported types. However, that would assume that re-exported types have documentation. In this codebase that might be true but would be a far reaching assumption in other codebases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-exported items like this one are actually documented in _
prefixed files. Can we detect such docs by following the imports/exports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, by using @deno/doc
. Though, I haven't tried it yet, and I assume it might come with a bit of a performance cost. IMHO, how it is now is fine enough to get the ball rolling on this lint plugin, and I think we could revisit this later. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's fine to land if this is only informative, not requirement in CI.
we could have this rule ignore re-exported types
Could you implement this for now? I think this directive would be confusing to contributors
_tools/docs_lint_plugin.ts
Outdated
// Copyright 2018-2025 the Deno authors. MIT license. | ||
|
||
function isInternalFile(filename: string): boolean { | ||
return filename.split("/").some((part) => part.startsWith("_")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will likely need to be refined in the future.
First step towards #6649.