Added JSDoc to ESLint (#3529)

* Added JSDoc to eslint rules

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>

* Fixed JSDoc eslint errors

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>

* Update the check-linters workflow to Node.js 20

---------

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
This commit is contained in:
Matthew Nickson
2023-08-11 09:46:41 +02:00
committed by GitHub
parent da4f4e3d76
commit 8a92054c2b
153 changed files with 1505 additions and 574 deletions

View File

@@ -18,6 +18,9 @@ const successMessage = "Successes!";
class Bark extends NotificationProvider {
name = "Bark";
/**
* @inheritdoc
*/
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
let barkEndpoint = notification.barkEndpoint;
@@ -45,8 +48,9 @@ class Bark extends NotificationProvider {
/**
* Add additional parameter for better on device styles (iOS 15
* optimized)
* @param {BeanModel} notification Notification to send
* @param {string} postUrl URL to append parameters to
* @returns {string}
* @returns {string} Additional URL parameters
*/
appendAdditionalParameters(notification, postUrl) {
// set icon to uptime kuma icon, 11kb should be fine
@@ -70,7 +74,8 @@ class Bark extends NotificationProvider {
/**
* Check if result is successful
* @param {Object} result Axios response object
* @param {object} result Axios response object
* @returns {void}
* @throws {Error} The status code is not in range 2xx
*/
checkResult(result) {
@@ -84,10 +89,11 @@ class Bark extends NotificationProvider {
/**
* Send the message
* @param {BeanModel} notification Notification to send
* @param {string} title Message title
* @param {string} subtitle Message
* @param {string} endpoint Endpoint to send request to
* @returns {string}
* @returns {string} Success message
*/
async postNotification(notification, title, subtitle, endpoint) {
// url encode title and subtitle