Skip to content

Commit

Permalink
Refactor docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Sep 23, 2023
1 parent 5ca7dfd commit 27da7c9
Show file tree
Hide file tree
Showing 3 changed files with 263 additions and 134 deletions.
23 changes: 12 additions & 11 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
* @property {string} hash
* Commit hash value.
* @property {string} project
* Project of the repo.
* Project name.
* @property {'commit'} type
* Kind.
* @property {string} user
* Owner of the repo.
* Owner of repo.
*
* @typedef BuildUrlCompareValues
* Info for commit hash ranges.
Expand All @@ -34,22 +34,22 @@
* @property {string} compare
* SHA of the range end.
* @property {string} project
* Project of the repo.
* Project name.
* @property {'compare'} type
* Kind.
* @property {string} user
* Owner of the repo.
* Owner of repo.
*
* @typedef BuildUrlIssueValues
* Info for issues.
* @property {string} no
* Issue number.
* @property {string} project
* Project of the repo.
* Project name.
* @property {'issue'} type
* Kind.
* @property {string} user
* Owner of the repo.
* Owner of repo.
*
* @typedef BuildUrlMentionValues
* Info for mentions.
Expand All @@ -71,17 +71,17 @@
* @typedef Options
* Configuration.
* @property {BuildUrl | null | undefined} [buildUrl]
* Change how (and whether) things are linked (optional).
* Change how things are linked (optional).
* @property {boolean | null | undefined} [mentionStrong=true]
* Wrap mentions in `strong` (default: `false`);
* Wrap mentions in `strong` (default: `true`);
* this makes them render more like how GitHub styles them, but GH itself
* uses CSS instead of `strong`.
* @property {string | null | undefined} [repository]
* Repository to link against (default: `repository` from `packag.json` in CWD in Node);
* should point to a GitHub repository.
* should point to a GitHub repository (such as `'user/project'`)
*
* @typedef RepositoryInfo
* Owner and project of the repo.
* Owner and project of repo.
* @property {string} project
* Project name.
* @property {string} user
Expand Down Expand Up @@ -175,7 +175,8 @@ const mentionRegex = new RegExp(
)

/**
* Autolink references like in GitHub issues, PRs, and comments.
* Link references to users, commits, and issues, in the same way that GitHub
* does in comments, issues, PRs, and releases.
*
* @param {Readonly<Options> | null | undefined} [options]
* Configuration (optional).
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"@types/mdast": "^4.0.0",
"mdast-util-find-and-replace": "^3.0.0",
"mdast-util-to-string": "^4.0.0",
"to-vfile": "^8.0.0",
"unist-util-visit": "^5.0.0",
"vfile": "^6.0.0"
},
Expand Down
Loading

0 comments on commit 27da7c9

Please sign in to comment.