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

Commit 3dc5cf6

Browse files
authored
Merge pull request #213 from netlify/lint/consistent-this
Enable `consistent-this` ESLint rule
2 parents b250cbd + 05102cb commit 3dc5cf6

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
@@ -5,7 +5,6 @@ module.exports = {
55
rules: {
66
// TODO: enable those rules
77
complexity: 0,
8-
'consistent-this': 0,
98
'id-length': 0,
109
'line-comment-position': 0,
1110
'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)