Search code examples
javascripttypescriptfirebasegoogle-cloud-functionsfirebase-cli

Why did Firebase CLI asked me if I wanted to use ESLint even when I selected TypeScript while initialising a cloud functions directory?


Here are the steps I did:

  1. I installed the Firebase CLI using npm.
  2. I created an empty directory
  3. Then I run the command firebase init functions and chose one of my existing projects
  4. Then the Firebase CLI asked me: What language would you like to use to write Cloud Functions?
  5. I chose TypeScript.
  6. Then the CLI asked me: Do you want to use ESLint to catch probable bugs and enforce style? (Whereas ideally, it should ask me: Do you want to use TSLint to catch probable bugs and enforce style? as in this tutorial: https://www.youtube.com/watch?v=DYfP-UIKxH0&t=289s)

Can someone help me with what could possibly go wrong here?


Solution

  • The video you're referring to is out of date. The Firebase CLI was recently updated to use ESLint instead of TSLint for checking possible code errors. According to the release notes for CLI version 8.11.0:

    Replaces tslint with eslint as the default linter in new Cloud Functions for Firebase directories.

    These tools both do similar things - check code for warnings. Neither of these lint tools affect the way the code actually work. You can just take the default, and it won't matter much.