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

Standardize Typescript styles between all repos. #1540

Closed
shane-tomlinson opened this issue Jun 7, 2019 · 4 comments
Closed

Standardize Typescript styles between all repos. #1540

shane-tomlinson opened this issue Jun 7, 2019 · 4 comments
Assignees

Comments

@shane-tomlinson
Copy link
Contributor

Now that we are using Typescript in no less than 3 repos, we should determine a common style to share amongst all of them.

cc @bbangert, @ianb, @lmorchard

Ref #808 which is for Javascript.

@lmorchard
Copy link
Contributor

FWIW, not that these have to be the rules we go with, but we merged in some TypeScript tweaks for eslint over on fxa-payments-server that might be a good starting point:

https://github.com/mozilla/fxa/pull/1357/files#diff-c9d5d4a598222f97e617f9c80fd7837c

Basically, just @typescript-eslint/recommended with a couple of tweaks for indentation and to match existing code.

@bbangert
Copy link
Member

For pure typescript repos, I went with the recommended lint settings, but the type/interface rules are weird in that it wants to make all type aliases into interfaces. There's some disagreement about the rationale for doing this in modern Typescript so we should probably opt out of this one.

See: palantir/tslint#3248 and https://medium.com/@martin_hotell/interface-vs-type-alias-in-typescript-2-7-2a8f1777af4c

I also have seen good rationale for not using I in front of every interface, even though tslint recommended wants it. This styleguide says not to use I in front, and has some additional guidance on types vs interfaces at least: https://basarat.gitbooks.io/typescript/docs/styleguide/styleguide.html

@clouserw clouserw added this to the Train 141 milestone Jun 24, 2019
@clouserw clouserw modified the milestones: Train 141, Train 142 Jul 8, 2019
@clouserw clouserw modified the milestones: Train 142, Train 143: FxA Jul 20, 2019
@vbudhram
Copy link
Contributor

vbudhram commented Aug 5, 2019

from mtg:

Moving to next train.

@dannycoates
Copy link
Contributor

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants