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

Top comments (0)