Skip to content
Permalink
Browse files

Update lintern rules

  • Loading branch information...
frandiox committed May 19, 2019
1 parent 90b6aff commit 5fae54dccb6c818fc0a93501df5c944b5235d9dd
@@ -41,12 +41,8 @@ module.exports = {
},
],

'unicorn/catch-error-name': [
'error',
{
name: 'err',
},
],
'unicorn/prevent-abbreviations': 'off',
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
},
overrides: [
{
@@ -63,9 +63,9 @@ export default function createApolloServer(
} else {
contextData = await context({ req, request: req })
}
} catch (err) {
logger.error(err)
throw err
} catch (error) {
logger.error(error)
throw error
}

return contextData
@@ -95,12 +95,12 @@ export default function createApolloServer(
request: req,
req,
})
} catch (err) {
if (err.status !== 401) {
logger.error(err)
} catch (error) {
if (error.status !== 401) {
logger.error(error)
}

throw err
throw error
}

return contextData
@@ -37,8 +37,8 @@ export default {
try {
// This redirects to home page
await authorizeSelf(this.username, this.password)
} catch (err) {
this.setError(err)
} catch (error) {
this.setError(error)
}
this.inProgress = false
@@ -54,8 +54,8 @@ export default {
await signupSelf(this.username, this.password)
this.isSuccess = true
this.logIn()
} catch (err) {
this.setError(err)
} catch (error) {
this.setError(error)
}
this.inProgress = false
@@ -69,8 +69,8 @@ export default {
try {
await passwordReset(this.resetEmail)
this.isSuccessForgetPassword = true
} catch (err) {
this.setError(err)
} catch (error) {
this.setError(error)
}
this.inProgressForgetPassword = false
},
@@ -112,8 +112,8 @@ export default {
},
},
})
} catch (err) {
console.error(err)
} catch (error) {
console.error(error)
}
this.newTitle = ''
@@ -136,8 +136,8 @@ export default {
},
},
})
} catch (err) {
console.error(err)
} catch (error) {
console.error(error)
}
},
async publishDraft(draft) {
@@ -187,8 +187,8 @@ export async function tryToLogIn() {

console.log('Authenticated!', user) // eslint-disable-line no-console
return true
} catch (err) {
console.error(err)
} catch (error) {
console.error(error)
}
}

@@ -280,8 +280,8 @@ export async function getCurrentUser() {
}

user = remoteUser
} catch (err) {
console.error(err)
} catch (error) {
console.error(error)
return null
}

@@ -82,12 +82,12 @@ export async function onLogout(apolloClient) {
if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient)
try {
await apolloClient.resetStore()
} catch (err) {
} catch (error) {
// eslint-disable-next-line no-console
console.log(
'%cError on cache reset (logout)',
'color: orange;',
err.message
error.message
)
}
}

0 comments on commit 5fae54d

Please sign in to comment.
You can’t perform that action at this time.