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

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

👋 Kindness is contagious

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

Okay