From d2bd6db5337b211ae5cbe5c11e47621d5be11953 Mon Sep 17 00:00:00 2001 From: Rachael Shaw Date: Sun, 15 Sep 2019 17:44:55 -0500 Subject: [PATCH] Tidy up some comments --- lib/app/configuration/default-hooks.js | 8 ++++---- lib/app/configuration/load.js | 4 ++-- lib/app/configuration/rc.js | 6 +++--- lib/app/private/after.js | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/app/configuration/default-hooks.js b/lib/app/configuration/default-hooks.js index 99e079cccc..2bc1524b29 100644 --- a/lib/app/configuration/default-hooks.js +++ b/lib/app/configuration/default-hooks.js @@ -2,7 +2,7 @@ * Default hooks * * (order still matters for now for some of these- - * but mostly not, due to ouruse of events... + * but mostly not, due to our use of events... * ...but for a few core hooks, e.g. `moduleloader`, * it still does.) * @@ -17,14 +17,14 @@ module.exports = { 'logger': true,//<< FUTURE: absorb into core (i.e. like what we did w/ the controllers hook -- can live in `lib/app/private/log-ship.js`, and the rest can be inlined) 'request': true, - // -•- For poterity, this is where the `orm` hook was formerly inserted (please don't get rid of this until we're a few patch releases into Sails v1, just so it's easier to reference.) + // -•- For posterity, this is where the `orm` hook was formerly inserted (please don't get rid of this until we're a few patch releases into Sails v1, just so it's easier to reference.) 'views': true, 'blueprints': true,//<< FUTURE: pull this out into a standalone hook and have it work like the other core hooks that get installed as peers (unless you do --without=blueprints) 'responses': true, 'helpers': true, - // -•- For poterity, this is where the `sockets` hook was formerly inserted (please don't get rid of this until we're a few patch releases into Sails v1, just so it's easier to reference.) + // -•- For posterity, this is where the `sockets` hook was formerly inserted (please don't get rid of this until we're a few patch releases into Sails v1, just so it's easier to reference.) 'pubsub': true,//<< FUTURE: **pull the private methods into the blueprints hook, and pull the PUBLIC methods into sails-hook-sockets -- i.e. if orm hook available, then sails-hook-sockets decorates models with RPS methods** 'policies': true, @@ -34,7 +34,7 @@ module.exports = { 'userconfig': true,//<< FUTURE: absorb into core (i.e. like what we did w/ the controllers hook -- can live in `lib/app/configuration`) 'session': true, - // -•- For poterity, this is where the `grunt` hook was formerly inserted (please don't get rid of this until we're a few patch releases into Sails v1, just so it's easier to reference.) + // -•- For posterity, this is where the `grunt` hook was formerly inserted (please don't get rid of this until we're a few patch releases into Sails v1, just so it's easier to reference.) 'http': true, 'userhooks': true//<< FUTURE: absorb into core (i.e. like what we did w/ the controllers hook -- its logic can live in `lib/app/private`, and be driven by `lib/hooks/index.js`) diff --git a/lib/app/configuration/load.js b/lib/app/configuration/load.js index 4f9fae3ffc..a8847d1e44 100644 --- a/lib/app/configuration/load.js +++ b/lib/app/configuration/load.js @@ -37,12 +37,12 @@ module.exports = function(sails) { async.auto({ /** - * Until this point this point, `sails.config` is composed only of + * Until this point, `sails.config` is composed only of * configuration overrides passed into `sails.lift(overrides)` * (or `sails.load(overrides)`-- same thing) * * This step clones this into an "overrides" object, negotiating cmdline - * shortcuts into the properly namespced sails configuration options. + * shortcuts into the properly namespaced sails configuration options. */ mapOverrides: function(cb) { diff --git a/lib/app/configuration/rc.js b/lib/app/configuration/rc.js index 0c688b7dc5..578db09472 100644 --- a/lib/app/configuration/rc.js +++ b/lib/app/configuration/rc.js @@ -10,8 +10,8 @@ var rttc = require('rttc'); /** * Load configuration from .rc files and env vars - * @param {string} namespace Namespace to look for env vars under (defaults to `sails`) - * @return {dictionary} A dictionary of config values gathered from .rc files, with env vars and command line options merged on top + * @param {String} namespace [namespace to look for env vars under (defaults to `sails`)] + * @return {Dictionary} A dictionary of config values gathered from .rc files, with env vars and command line options merged on top */ module.exports = function(namespace) { @@ -26,7 +26,7 @@ module.exports = function(namespace) { // guesstimate the types. // NOTE -- the code below is lifted from the `rc` module, and modified to: // 1. Pass JSHint - // 2. Run parseHuman on values + // 2. Run `parseHuman` on values // If at some point `rc` exposes metadata about which configs came from // the environment, we can simplify our code by just running `parseHuman` // on those values instead of doing the work to pluck them from the env. diff --git a/lib/app/private/after.js b/lib/app/private/after.js index fd732b8605..2f5bd6367a 100644 --- a/lib/app/private/after.js +++ b/lib/app/private/after.js @@ -46,8 +46,8 @@ module.exports = function mixinAfter(emitter) { * Override `EventEmitter.prototype.emit` to keep track of all the events that have occurred once. * (Required to support `emitter.after()`) * - * @param {String} eventName name of the event - * @return {boolean} Returns true if the event had listeners, false otherwise. + * @param {String} eventName [name of the event] + * @return {Boolean} Returns true if the event had listeners, false otherwise. * @see https://nodejs.org/api/events.html#events_emitter_emit_eventname_args */ emitter.emit = function(eventName) {