Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

343
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!