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/media | |
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/media')
-rw-r--r-- | ext/js/media/media-util.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/js/media/media-util.js b/ext/js/media/media-util.js index 78668471..582b13a2 100644 --- a/ext/js/media/media-util.js +++ b/ext/js/media/media-util.js @@ -22,8 +22,8 @@ class MediaUtil { /** * Gets the file extension of a file path. URL search queries and hash * fragments are not handled. - * @param path The path to the file. - * @returns The file extension, including the '.', or an empty string + * @param {string} path The path to the file. + * @returns {string} The file extension, including the '.', or an empty string * if there is no file extension. */ static getFileNameExtension(path) { @@ -33,9 +33,9 @@ class MediaUtil { /** * Gets an image file's media type using a file path. - * @param path The path to the file. - * @returns The media type string if it can be determined from the file path, - * otherwise null. + * @param {string} path The path to the file. + * @returns {?string} The media type string if it can be determined from the file path, + * otherwise `null`. */ static getImageMediaTypeFromFileName(path) { switch (this.getFileNameExtension(path).toLowerCase()) { @@ -70,9 +70,9 @@ class MediaUtil { /** * Gets the file extension for a corresponding media type. - * @param mediaType The media type to use. - * @returns A file extension including the dot for the media type, - * otherwise null. + * @param {string} mediaType The media type to use. + * @returns {?string} A file extension including the dot for the media type, + * otherwise `null`. */ static getFileExtensionFromImageMediaType(mediaType) { switch (mediaType) { @@ -101,9 +101,9 @@ class MediaUtil { /** * Gets the file extension for a corresponding media type. - * @param mediaType The media type to use. - * @returns A file extension including the dot for the media type, - * otherwise null. + * @param {string} mediaType The media type to use. + * @returns {string} A file extension including the dot for the media type, + * otherwise `null`. */ static getFileExtensionFromAudioMediaType(mediaType) { switch (mediaType) { |