diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2022-05-20 10:28:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-20 10:28:38 -0400 |
commit | 31e20c889e467aa4ba64b0b5baf602adc1359371 (patch) | |
tree | a033db935a817b2d407ec20843176610a87a6e16 /ext/js/yomichan.js | |
parent | ae0ad227c0fd293609a21e5cc1d2a4b85fe7c520 (diff) |
ESlint JSdoc (#2148)
* Install eslint-plugin-jsdoc
* Initial rules setup
* Update lists
* Use @returns rather than @return
* Remove error throwing code which is never executed
* Fix issues relating to @throws
* General error fixes
* Update Display type documentation
* Various doc fixes
* Fix invalid tuple syntax
* Doc updates
* Remove unused
* Doc updates
* Enable jsdoc/require-returns
* Update rules
* Update remaining rules
Diffstat (limited to 'ext/js/yomichan.js')
-rw-r--r-- | ext/js/yomichan.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/js/yomichan.js b/ext/js/yomichan.js index 4ec9db9c..9bc9cc5f 100644 --- a/ext/js/yomichan.js +++ b/ext/js/yomichan.js @@ -150,16 +150,17 @@ class Yomichan extends EventDispatcher { /** * Checks whether or not a URL is an extension URL. * @param {string} url The URL to check. - * @returns true if the URL is an extension URL, false otherwise. + * @returns {boolean} `true` if the URL is an extension URL, `false` otherwise. */ isExtensionUrl(url) { return this._extensionUrlBase !== null && url.startsWith(this._extensionUrlBase); } /** - * Runs chrome.runtime.sendMessage() with additional exception handling events. - * @param {...*} args The arguments to be passed to chrome.runtime.sendMessage(). - * @returns {void} The result of the chrome.runtime.sendMessage() call. + * Runs `chrome.runtime.sendMessage()` with additional exception handling events. + * @param {...*} args The arguments to be passed to `chrome.runtime.sendMessage()`. + * @returns {void} The result of the `chrome.runtime.sendMessage()` call. + * @throws {Error} Errors thrown by `chrome.runtime.sendMessage()` are re-thrown. */ sendMessage(...args) { try { @@ -171,9 +172,10 @@ class Yomichan extends EventDispatcher { } /** - * Runs chrome.runtime.connect() with additional exception handling events. - * @param {...*} args The arguments to be passed to chrome.runtime.connect(). + * Runs `chrome.runtime.connect()` with additional exception handling events. + * @param {...*} args The arguments to be passed to `chrome.runtime.connect()`. * @returns {Port} The resulting port. + * @throws {Error} Errors thrown by `chrome.runtime.connect()` are re-thrown. */ connect(...args) { try { |