mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-29 18:30:13 +08:00
Disallow spaces before anonymous/named function parens
This commit is contained in:
parent
e49c5c175e
commit
e2ef03cc32
@ -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.
|
||||
|
@ -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');
|
||||
}
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user