firebase / firebase/functions-samples
'use strict'; declared in firebase function samples
- Dominant language
- JavaScript
- Stars
- 12.2k
- Forks
- 3.8k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
Posting this here as per @codingdoug's suggestion.
https://groups.google.com/forum/#!topic/firebase-talk/xCSiEP82kf0
I've noticed that `'use strict';`is declared at the top of a lot of files in https://github.com/firebase/functions-samples but yet, when I watch different firebase videos on youtube from the firebase team, they don't use it there. I've googled what it actually means, and it makes sense that I would enable this so called "strict mode" on my production grade project, but I was wondering if anyone could shed any light on why it's not included in the videos/every sample. Maybe I'm just being anal. Maybe it's just me being a Java dev for so long that I don't understand what it is (new to this server/nodejs world of things. I also get that this probably has nothing to do with firebase as well.
It sounds like @codingdoug was saying that TS files don't need `use strict`; for strict mode.
In the sample TS function on the github page it does include this line. Are you saying that the sample TS file is incorrect?
https://github.com/firebase/functions-samples/blob/master/typescript-getting-started/functions/src/index.ts
Apologies if this is a dumb question and that this is a bit all over the place.
Contributor guide
Research direction
Start by reviewing the functions-samples examples and the referenced typescript-getting-started/functions/src/index.ts file, then compare the use of `'use strict';` across the JavaScript and TypeScript samples. The issue needs a maintainer decision on the intended convention before any sample changes or documentation update can be considered done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100