Cloud function problem with promises, error when compiling

Clash Royale CLAN TAG#URR8PPP
Cloud function problem with promises, error when compiling
My cloud function is:
exports.onCommentarie = functions.firestore
.document('posts/postId/commentaries/commentarieId')
.onCreate((context) =>
let postId = context.params.postId
let commentarieId = context.params.commentarieId
let commentarie = context.data.data().comment
let ownerCommentarieName = context.data.data().creatorName
let ownerCommentarieId = context.data.data().creatorId
let postCreatorId = context.data.data().postCreatorId
console.log(postCreatorId)
const store = admin.firestore()
store.collection('users').doc(postCreatorId).get()
.then(doc =>
let userToken = doc.data().tokenId
return userToken
)
.then(userToken =>
console.log(userToken)
console.log('O token destino é:', userToken)
console.log('O id de quem criou o post é:', postCreatorId)
console.log('O comentário foi:', commentarie)
console.log('O nome de quem comentou é:', ownerCommentarieName)
console.log('o Id do post foi:', postId)
console.log('o Id do comentário foi:', commentarieId)
let message =
notification:
title: 'Comentário no seu post de:',
body: ownerCommentarieName
,
token: userToken
admin.messaging().send(message)
.then((response) =>
return console.log('Successfully sent message:', response)
)
.catch(err =>
return console.log(err)
)
)
)
It is resulting in a lot of junk errors, as follow:
38:3 error Expected catch() or return promise/catch-or-return
43:9 error Each then() should return a value or throw promise/always-return
58:3 warning Avoid nesting promises promise/no-nesting
58:3 warning Avoid nesting promises promise/no-nesting
WHAT?!!? What is lint saying that?
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.