Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

352
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda