Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Commit 05102cb

Browse files
committed
Enable consistent-this ESLint rule
1 parent e786d79 commit 05102cb

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ module.exports = {
66
// TODO: enable those rules
77
'array-callback-return': 0,
88
complexity: 0,
9-
'consistent-this': 0,
109
'id-length': 0,
1110
'line-comment-position': 0,
1211
'max-nested-callbacks': 0,

src/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,11 @@ class NetlifyAPI {
5959
async getAccessToken(ticket, opts) {
6060
opts = { poll: 1000, timeout: 3.6e6, ...opts }
6161

62-
const api = this
63-
6462
const { id } = ticket
6563

6664
let authorizedTicket // ticket capture
6765
const checkTicket = async () => {
68-
const t = await api.showTicket({ ticketId: id })
66+
const t = await this.showTicket({ ticketId: id })
6967
if (t.authorized) {
7068
authorizedTicket = t
7169
}
@@ -78,7 +76,7 @@ class NetlifyAPI {
7876
message: 'Timeout while waiting for ticket grant',
7977
})
8078

81-
const accessTokenResponse = await api.exchangeTicket({ ticketId: authorizedTicket.id })
79+
const accessTokenResponse = await this.exchangeTicket({ ticketId: authorizedTicket.id })
8280
// See https://open-api.netlify.com/#/default/exchangeTicket for shape
8381
this.accessToken = accessTokenResponse.access_token
8482
return accessTokenResponse.access_token

0 commit comments

Comments
 (0)