Permalink
Browse files

everything must be 80 columns like

God intended
  • Loading branch information...
1 parent e90ce34 commit 32fafa5ba8f59497d6f8c788b8b47ad505f94a47 @yunong yunong committed Sep 21, 2015
Showing with 26 additions and 20 deletions.
  1. +3 −3 .jscsrc
  2. +16 −11 lib/bunyan_helper.js
  3. +2 −1 lib/index.js
  4. +5 −5 lib/response.js
View
@@ -20,9 +20,9 @@
// alignment rules
"maximumLineLength": {
"value": 80,
- "allowComments": true,
- "allowUrlComments": true,
- "allowRegex": true
+ "allowComments": false,
+ "allowUrlComments": false,
+ "allowRegex": false
},
"validateIndentation": 4,
View
@@ -46,24 +46,29 @@ function appendStream(streams, s) {
///--- API
-
/**
* A Bunyan stream to capture records in a ring buffer and only pass through
* on a higher-level record. E.g. buffer up all records but only dump when
* getting a WARN or above.
* @public
* @class
* @param {Object} opts contains the parameters:
- * @param {Object} opts.stream The stream to which to write when dumping captured
- * records. One of `stream` or `streams` must be specified.
- * @param {Array} opts.streams One of `stream` or `streams` must be specified.
- * @param {Number | String} opts.level The level at which to trigger dumping captured
- * records. Defaults to bunyan.WARN.
- * @param {Number} opts.maxRecords Number of records to capture. Default 100.
- * @param {Number} opts.maxRequestIds Number of simultaneous request id capturing
- * buckets to maintain. Default 1000.
- * @param {Boolean} opts.dumpDefault If true, then dump captured records on the
- * *default* request id when dumping. I.e. dump records logged without
+ * @param {Object} opts.stream The stream to which to write when
+ * dumping captured records. One of `stream`
+ * or `streams` must be specified.
+ * @param {Array} opts.streams One of `stream` or `streams` must be
+ * specified.
+ * @param {Number | String} opts.level The level at which to trigger dumping
+ * captured records. Defaults to
+ * bunyan.WARN.
+ * @param {Number} opts.maxRecords Number of records to capture. Default
+ * 100.
+ * @param {Number} opts.maxRequestIds Number of simultaneous request id
+ * capturing buckets to maintain. Default
+ * 1000.
+ * @param {Boolean} opts.dumpDefault If true, then dump captured records on
+ * the *default* request id when dumping.
+ * I.e. dump records logged without
* "req_id" field. Default false.
*/
function RequestCaptureStream(opts) {
View
@@ -50,7 +50,8 @@ function createServer(options) {
* @public
* @function realizeUrl
* @param {String} pattern a url string
- * @param {Object} params a hash of parameter names to values for substitution
+ * @param {Object} params a hash of parameter names to values for
+ * substitution
* @returns {String}
*/
function realizeUrl(pattern, params) {
View
@@ -305,11 +305,11 @@ Response.prototype.send = function send(code, body, headers) {
function _cb(err, _body) {
// the problem here is that if the formatter throws an error, we can't
// actually format the error again, since the formatter already failed.
- // So all we can do is send back a 500 with no body, since we don't know
- // at this point what format to send the error as. Additionally, the current
- // 'after' event is emitted _before_ we send the response, so there's no way
- // to re-emit the error here. TODO: clean up 'after' even emitter so we
- // pick up the error here.
+ // So all we can do is send back a 500 with no body, since we don't
+ // know at this point what format to send the error as. Additionally,
+ // the current 'after' event is emitted _before_ we send the response,
+ // so there's no way to re-emit the error here. TODO: clean up 'after'
+ // even emitter so we pick up the error here.
if (err) {
self._data = null;
self.statusCode = 500;

0 comments on commit 32fafa5

Please sign in to comment.