chore: fix JSDoc warnings (#1151)

- The type in `@type` should be surrounded by curly braces
- We should use `@type` in some cases where we used `@property`
- `@module` descriptions should go above such tag
- Namespaces should not declare their access type

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This commit is contained in:
Juan Cruz Viotti 2017-03-02 12:13:28 -04:00 committed by GitHub
parent dfd5f70013
commit 1a00430999
18 changed files with 38 additions and 37 deletions

View File

@ -26,7 +26,7 @@ const packageJSON = require('../../package.json');
/** /**
* @summary Parsed CLI options and arguments * @summary Parsed CLI options and arguments
* @type Object * @type {Object}
* @public * @public
*/ */
module.exports = yargs module.exports = yargs

View File

@ -24,7 +24,6 @@ const os = require('os');
/** /**
* @summary Unmount command templates * @summary Unmount command templates
* @namespace COMMAND_TEMPLATES * @namespace COMMAND_TEMPLATES
* @private
* *
* We make sure that the commands declared here exit * We make sure that the commands declared here exit
* successfully even if the drive is not mounted. * successfully even if the drive is not mounted.
@ -34,12 +33,14 @@ const COMMAND_TEMPLATES = {
/** /**
* @property {String} darwin * @property {String} darwin
* @memberof COMMAND_TEMPLATES * @memberof COMMAND_TEMPLATES
* @private
*/ */
darwin: '/usr/sbin/diskutil unmountDisk force <%= device %>', darwin: '/usr/sbin/diskutil unmountDisk force <%= device %>',
/** /**
* @property {String} linux * @property {String} linux
* @memberof COMMAND_TEMPLATES * @memberof COMMAND_TEMPLATES
* @private
* *
* @description * @description
* If trying to unmount the raw device in Linux, we get: * If trying to unmount the raw device in Linux, we get:

View File

@ -29,22 +29,22 @@ module.exports = function(
/** /**
* @summary The drive selector state * @summary The drive selector state
* @property * @type {Object}
* @type Object * @public
*/ */
this.state = SelectionStateModel; this.state = SelectionStateModel;
/** /**
* @summary Static methods to check a drive's properties * @summary Static methods to check a drive's properties
* @property * @type {Object}
* @type Object * @public
*/ */
this.constraints = DriveConstraintsModel; this.constraints = DriveConstraintsModel;
/** /**
* @summary The drives model * @summary The drives model
* @property * @type {Object}
* @type Object * @public
* *
* @description * @description
* We expose the whole service instead of the `.drives` * We expose the whole service instead of the `.drives`

View File

@ -20,7 +20,7 @@ module.exports = function($uibModalInstance, tooltipData) {
/** /**
* @summary Tooltip data * @summary Tooltip data
* @property * @type {Object}
* @public * @public
*/ */
this.data = tooltipData; this.data = tooltipData;

View File

@ -27,14 +27,14 @@ module.exports = function($uibModalInstance, SettingsModel, options) {
/** /**
* @summary Settings model * @summary Settings model
* @type Object * @type {Object}
* @public * @public
*/ */
this.settings = SettingsModel; this.settings = SettingsModel;
/** /**
* @summary Modal options * @summary Modal options
* @type Object * @type {Object}
* @public * @public
*/ */
this.options = options; this.options = options;

View File

@ -20,7 +20,7 @@ module.exports = function($uibModalInstance, options) {
/** /**
* @summary Modal options * @summary Modal options
* @property * @type {Object}
* @public * @public
*/ */
this.options = options; this.options = options;

View File

@ -24,7 +24,7 @@ const constraints = require('../../shared/drive-constraints');
/** /**
* @summary Application default state * @summary Application default state
* @type Object * @type {Object}
* @constant * @constant
* @private * @private
*/ */
@ -49,7 +49,7 @@ const DEFAULT_STATE = Immutable.fromJS({
/** /**
* @summary State path to be persisted * @summary State path to be persisted
* @type String * @type {Object}
* @constant * @constant
* @private * @private
*/ */
@ -57,7 +57,7 @@ const PERSISTED_PATH = 'settings';
/** /**
* @summary Application supported action messages * @summary Application supported action messages
* @type Object * @type {Object}
* @constant * @constant
*/ */
const ACTIONS = _.fromPairs(_.map([ const ACTIONS = _.fromPairs(_.map([

View File

@ -17,10 +17,10 @@
'use strict'; 'use strict';
/** /**
* @module Etcher.OS.Dialog
*
* The purpose of this module is to provide an easy way * The purpose of this module is to provide an easy way
* to interact with OS dialogs. * to interact with OS dialogs.
*
* @module Etcher.OS.Dialog
*/ */
const angular = require('angular'); const angular = require('angular');

View File

@ -17,10 +17,10 @@
'use strict'; 'use strict';
/** /**
* @module Etcher.OS.Notification
*
* The purpose of this module is to provide an easy way * The purpose of this module is to provide an easy way
* to send desktop notifications. * to send desktop notifications.
*
* @module Etcher.OS.Notification
*/ */
const angular = require('angular'); const angular = require('angular');

View File

@ -22,7 +22,7 @@ module.exports = function() {
/** /**
* @summary A reference to the current renderer Electron window * @summary A reference to the current renderer Electron window
* @property * @type {Object}
* @protected * @protected
* *
* @description * @description

View File

@ -17,11 +17,11 @@
'use strict'; 'use strict';
/** /**
* @module Etcher.OS.WindowProgress
*
* The purpose of this module is to provide an easy way * The purpose of this module is to provide an easy way
* to interact with the operating system's window progress * to interact with the operating system's window progress
* functionality, as described in Electron docs. * functionality, as described in Electron docs.
*
* @module Etcher.OS.WindowProgress
*/ */
const angular = require('angular'); const angular = require('angular');

View File

@ -20,14 +20,14 @@ module.exports = function($state, FlashStateModel, SelectionStateModel, Analytic
/** /**
* @summary Settings model * @summary Settings model
* @type Object * @type {Object}
* @public * @public
*/ */
this.settings = SettingsModel; this.settings = SettingsModel;
/** /**
* @summary Source checksum * @summary Source checksum
* @type String * @type {String}
* @public * @public
*/ */
this.checksum = FlashStateModel.getLastFlashSourceChecksum(); this.checksum = FlashStateModel.getLastFlashSourceChecksum();

View File

@ -17,13 +17,13 @@
'use strict'; 'use strict';
/** /**
* @module Etcher.Pages.Finish
*
* The finish page represents the application state where * The finish page represents the application state where
* the the flash/validation has completed. * the the flash/validation has completed.
* *
* Its purpose is to display success or failure information, * Its purpose is to display success or failure information,
* as well as the "next steps". * as well as the "next steps".
*
* @module Etcher.Pages.Finish
*/ */
const angular = require('angular'); const angular = require('angular');

View File

@ -17,9 +17,9 @@
'use strict'; 'use strict';
/** /**
* @module Etcher.Pages.Main * This page represents the application main page.
* *
* The finish page represents the application main page. * @module Etcher.Pages.Main
*/ */
const angular = require('angular'); const angular = require('angular');

View File

@ -22,7 +22,7 @@ module.exports = function(WarningModalService, SettingsModel) {
/** /**
* @summary Client platform * @summary Client platform
* @type String * @type {String}
* @constant * @constant
* @public * @public
*/ */
@ -39,7 +39,7 @@ module.exports = function(WarningModalService, SettingsModel) {
/** /**
* @summary Current settings value * @summary Current settings value
* @type Object * @type {Object}
* @public * @public
*/ */
this.currentData = {}; this.currentData = {};
@ -47,7 +47,7 @@ module.exports = function(WarningModalService, SettingsModel) {
/** /**
* @summary Settings model * @summary Settings model
* @type Object * @type {Object}
* @public * @public
*/ */
this.model = SettingsModel; this.model = SettingsModel;

View File

@ -17,10 +17,10 @@
'use strict'; 'use strict';
/** /**
* @module Etcher.Utils.ByteSize
*
* The purpose of this module is to provide utilities * The purpose of this module is to provide utilities
* to work with sizes in bytes. * to work with sizes in bytes.
*
* @module Etcher.Utils.ByteSize
*/ */
const angular = require('angular'); const angular = require('angular');

View File

@ -17,11 +17,11 @@
'use strict'; 'use strict';
/** /**
* @module Etcher.Utils.ManifestBind
*
* The purpose of this module is to provide an attribute * The purpose of this module is to provide an attribute
* directive to bind the current element to a property * directive to bind the current element to a property
* in the application's `package.json` manifest. * in the application's `package.json` manifest.
*
* @module Etcher.Utils.ManifestBind
*/ */
const angular = require('angular'); const angular = require('angular');

View File

@ -17,10 +17,10 @@
'use strict'; 'use strict';
/** /**
* @module Etcher.Utils.Path
*
* The purpose of this module is to provide utilities * The purpose of this module is to provide utilities
* to work with file paths. * to work with file paths.
*
* @module Etcher.Utils.Path
*/ */
const angular = require('angular'); const angular = require('angular');