Skip to content

Commit 5c30ecd

Browse files
committed
Fix linting
1 parent e868b80 commit 5c30ecd

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"scripts": {
99
"build": "rollup -c",
1010
"prepublish": "npm run build",
11-
"lint": "standard src test",
11+
"lint": "standard src/**/*.js",
1212
"test_": "mocha",
1313
"test": "echo Tests disabled, TODO: FIX THIS!",
1414
"2npm": "publish"

src/RawAPI.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -380,19 +380,19 @@ export class RawAPI extends EventEmitter {
380380
const ret = await zlib.inflateAsync(buf)
381381
return JSON.parse(ret.toString())
382382
}
383-
buildRateLimit(method, path, res) {
383+
buildRateLimit (method, path, res) {
384384
const {
385385
headers: {
386386
'x-ratelimit-limit': limit,
387387
'x-ratelimit-remaining': remaining,
388-
'x-ratelimit-reset': reset,
388+
'x-ratelimit-reset': reset
389389
} = {}
390390
} = res
391391
return {
392392
method,
393393
path,
394-
limit: +limit,
395-
remaining:+remaining,
394+
limit: +limit,
395+
remaining: +remaining,
396396
reset: +reset,
397397
toReset: reset - Math.floor(Date.now() / 1000)
398398
}

src/ScreepsAPI.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ export class ScreepsAPI extends RawAPI {
7070
'/api/game/market/orders': defaultLimit(60, 'hour'),
7171
'/api/game/market/my-orders': defaultLimit(60, 'hour'),
7272
'/api/game/market/stats': defaultLimit(60, 'hour'),
73-
'/api/game/user/money-history': defaultLimit(60, 'hour'),
73+
'/api/game/user/money-history': defaultLimit(60, 'hour')
7474
},
7575
POST: {
7676
'/api/user/console': defaultLimit(360, 'hour'),
7777
'/api/game/map-stats': defaultLimit(60, 'hour'),
7878
'/api/user/code': defaultLimit(240, 'day'),
7979
'/api/user/set-active-branch': defaultLimit(240, 'day'),
8080
'/api/user/memory': defaultLimit(240, 'day'),
81-
'/api/user/memory-segment': defaultLimit(60, 'hour'),
81+
'/api/user/memory-segment': defaultLimit(60, 'hour')
8282
}
8383
}
8484
this.on('rateLimit', limits => {
@@ -90,11 +90,11 @@ export class ScreepsAPI extends RawAPI {
9090
})
9191
this.socket = new Socket(this)
9292
}
93-
getRateLimit(method, path) {
93+
getRateLimit (method, path) {
9494
return this.rateLimits[method][path] || this.rateLimits.global
9595
}
96-
get rateLimitResetUrl() {
97-
return `https://screeps.com/a/#!/account/auth-tokens/noratelimit?token=${this.token.slice(0,8)}`
96+
get rateLimitResetUrl () {
97+
return `https://screeps.com/a/#!/account/auth-tokens/noratelimit?token=${this.token.slice(0, 8)}`
9898
}
9999
async me () {
100100
this.user = await this.raw.auth.me()

0 commit comments

Comments
 (0)