Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

345
Visualizações
Firebase deploy cloud functions Error: Typescript

I'm using firebase cloud functions with typescript. Is it usual that I have to add JSDoc comments and can't use any with typescript and firebase cloud functions? It seems very strict when deploying. The build command seemed to work fine. Also in an emulator environment (npm run serve), it also worked. Lint is not showing them as errors in vs code. And my autosave doesn't fix most of the line length issues as they are comments. It's weird as some of the lines have been suggested by firebase themself and it seemed like they didn't get an error using the same code.

I use $ firebase deploy --only functions and then get:

I got a lot of these:

15:1 error Expected indentation of 6 spaces but found 4 indent

I already fixed most of them but it doesn't seem usual

=== Deploying to ''...

i  deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint

> lint
> eslint --ext .js,.ts .


/Users/user/Documents/firebase-host/functions/src/index.ts
  14:1   error    This line has a length of 81. Maximum allowed is 80  max-len
  25:1   error    Missing JSDoc comment                                require-jsdoc
  27:50  warning  Unexpected any. Specify a different type             @typescript-eslint/no-explicit-any
  50:1   error    This line has a length of 81. Maximum allowed is 80  max-len

✖ 4 problems (3 errors, 1 warning)


Error: functions predeploy error: Command terminated with non-zero exit code1

Some of the error code where it wants me to set a JSDoc:

async function grandSuperAdminRole(email: string): Promise<void> {
  const user = await admin.auth().getUserByEmail(email);
  if (user.customClaims && (user.customClaims as any).superAdmin === true) {
    return;
  }
  return admin.auth().setCustomUserClaims(user.uid, {
    superAdmin: true,
  });
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda