diff --git a/.eslintrc.js b/.eslintrc.js index fde2d93..5b9db8a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -26,7 +26,9 @@ module.exports = { // Don't allow unused variables, but allow unused function args (e.g. in callbacks) and global vars 'no-unused-vars': ['error', {vars: 'local', args: 'none'}], // Require using dot notation (obj.prop instead of obj['prop']) where possible - 'dot-notation': 'error' + 'dot-notation': 'error', + // Don't use spaces before parens in anonymous or named functions + 'space-before-function-paren': ['error', {anonymous: 'never', named: 'never', asyncArrow: 'always'}] // We will NOT be using eqeqeq for a few reasons: // 1. I would have to go through and check every single `==` to make sure that it's not depending on loose equality checks. diff --git a/classes/CMarketItem.js b/classes/CMarketItem.js index ba75d14..8dd40c5 100644 --- a/classes/CMarketItem.js +++ b/classes/CMarketItem.js @@ -91,7 +91,7 @@ function CMarketItem(appid, hashName, community, body, $) { // TODO: Buying listings and placing buy orders } -CMarketItem.prototype.updatePrice = function (currency, callback) { +CMarketItem.prototype.updatePrice = function(currency, callback) { if (this.commodity) { this.updatePriceForCommodity(currency, callback); } else { @@ -142,7 +142,7 @@ CMarketItem.prototype.updatePriceForCommodity = function(currency, callback) { }, 'steamcommunity'); }; -CMarketItem.prototype.updatePriceForNonCommodity = function (currency, callback) { +CMarketItem.prototype.updatePriceForNonCommodity = function(currency, callback) { if (this.commodity) { throw new Error('Cannot update price for commodity item'); } diff --git a/classes/CSteamGroup.js b/classes/CSteamGroup.js index 6d8d74b..edb2a5c 100644 --- a/classes/CSteamGroup.js +++ b/classes/CSteamGroup.js @@ -98,7 +98,7 @@ CSteamGroup.prototype.editEvent = function(id, name, type, description, time, se this._community.editGroupEvent(this.steamID, id, name, type, description, time, server, callback); }; -CSteamGroup.prototype.deleteEvent = function (id, callback) { +CSteamGroup.prototype.deleteEvent = function(id, callback) { this._community.deleteGroupEvent(this.steamID, id, callback); }; diff --git a/components/market.js b/components/market.js index c786eeb..7f5b82c 100644 --- a/components/market.js +++ b/components/market.js @@ -17,7 +17,7 @@ SteamCommunity.prototype.getMarketApps = function(callback) { let $ = Cheerio.load(body); if ($('.market_search_game_button_group')) { let apps = {}; - $('.market_search_game_button_group a.game_button').each(function (i, element) { + $('.market_search_game_button_group a.game_button').each((i, element) => { let e = Cheerio.load(element); let name = e('.game_button_game_name').text().trim(); let url = element.attribs.href;