From 5f8afc997c793ca16de53aa56ac4d40b8afc8d4a Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 23 Jul 2021 23:21:54 -0700 Subject: [PATCH] [eslint] enable `semi-style` --- .eslintrc | 1 + index.js | 6 ++---- lib/default_stream.js | 3 +-- lib/results.js | 4 +--- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.eslintrc b/.eslintrc index 5a8de8df..9d426858 100644 --- a/.eslintrc +++ b/.eslintrc @@ -26,6 +26,7 @@ "no-undef": "error", "no-useless-escape": "error", "operator-linebreak": ["error", "before"], + "semi-style": ["error", "last"], "space-infix-ops": "error", "space-unary-ops": ["error", { "words": false, diff --git a/index.js b/index.js index 4aa5f8e5..44dd0f9c 100644 --- a/index.js +++ b/index.js @@ -7,11 +7,9 @@ var createResult = require('./lib/results'); var through = require('through'); var canEmitExit = typeof process !== 'undefined' && process - && typeof process.on === 'function' && process.browser !== true -; + && typeof process.on === 'function' && process.browser !== true; var canExit = typeof process !== 'undefined' && process - && typeof process.exit === 'function' -; + && typeof process.exit === 'function'; module.exports = (function () { var wait = false; diff --git a/lib/default_stream.js b/lib/default_stream.js index f8901ed4..03dcba0a 100644 --- a/lib/default_stream.js +++ b/lib/default_stream.js @@ -12,8 +12,7 @@ module.exports = function () { for (var i = 0; i < buf.length; i++) { var c = typeof buf === 'string' ? buf.charAt(i) - : String.fromCharCode(buf[i]) - ; + : String.fromCharCode(buf[i]); if (c === '\n') flush(); else line += c; } diff --git a/lib/results.js b/lib/results.js index 37bb1917..bd5cf2d7 100644 --- a/lib/results.js +++ b/lib/results.js @@ -16,9 +16,7 @@ var $push = callBound('Array.prototype.push'); var yamlIndicators = /:|-|\?/; var nextTick = typeof setImmediate !== 'undefined' ? setImmediate - : process.nextTick -; - + : process.nextTick; module.exports = Results; inherits(Results, EventEmitter);