Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update Functions template files #2919

Merged
merged 5 commits into from
Jan 6, 2021
Merged

update Functions template files #2919

merged 5 commits into from
Jan 6, 2021

Conversation

bkendall
Copy link
Contributor

Description

  1. Updates both JS and TS eslint setups to be the same (same template name) and greatly simplify their configurations.
  2. Adds a tsconfig.dev.json to the TS+eslint path to appropriately lint .eslintrc.js.

Fixes #2913

As an aside: I wouldn't be opposed to simplifying this further and not offering the no-lint path. Also, we don't have any script for npm test, so there's nothing blocking about always including lint (except your IDE might start flagging issues sooner). Food for thought...

Scenarios Tested

  • JS with and without lint
  • TS with and without lint

Sample Commands

firebase init functions

@bkendall bkendall requested review from joehan and samtstern December 10, 2020 20:12
@google-cla google-cla bot added the cla: yes Manual indication that this has passed CLA. label Dec 10, 2020
@samtstern
Copy link
Contributor

@bkendall FWIW I always choose the no-lint path. I find JS linters to be mostly annoying, but I am maybe in the minority.

Copy link
Contributor

@joehan joehan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One issue, but otherwise this LGTM

@@ -1,7 +1,7 @@
{
"name": "functions",
"scripts": {
"lint": "eslint \"src/**/*\"",
"lint": "eslint --ext .js,.ts .",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this cause eslint to lint compiled js files? I think we don't want that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joehan I don't think it would, as JS files (apart from .eslintrc.js) are listed in the .gitignore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I've been working on coming back to this but @hithomasmorelli is correct)

@bkendall bkendall merged commit df3e416 into master Jan 6, 2021
@bkendall bkendall deleted the bk-2913 branch January 6, 2021 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Manual indication that this has passed CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should functions contain a .eslintignore file?
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy