DEV Community

Matt Ruiz
Matt Ruiz

Posted on

Disabling ESLint in Firebase Cloud Functions using Node

Hola hola,

I was working inside of a Firebase Cloud Functions project and my builds were failing because ESLint didn't like me using any.

Ideally, we're not using any in our code but it's not a real priority for an early stage product.

Problem

If you're receiving an ESLint error then you can copy and paste the warning(s)/error(s) listed.

/Users/matthewruiz/github/golfassistai/golf-assist-ai-cloud-functions/functions/src/api/firestore/DocumentRetriever.ts
   63:13  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
   92:13  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  250:10  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  278:18  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
Enter fullscreen mode Exit fullscreen mode

Solution

Add to rules object of .eslintrc.js along with a off value.

"@typescript-eslint/no-explicit-any": "off"
Enter fullscreen mode Exit fullscreen mode

Hope that helps.

-Matt

Sentry mobile image

Tired of users complaining about slow app loading and janky UI?

Improve performance with key strategies like TTID/TTFD & app start analysis.

Read the blog post

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay