-
-
Notifications
You must be signed in to change notification settings - Fork 284
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
Code styling #349
Comments
Hello @troyanskiy, 1 and 2. I follow the official guideline https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines I propose a vote for that ;).
Thanks for your proposals, I'm happy about that ;) See you, |
@troyanskiy You can work on the rules which are simple to set up in a first and on which we are ok :) |
|
Yes for the "I" it's a problem. I started with, but now some interfaces doesn't follow this rules. Now, we can follow this rules and prepare the code migration to this goal. I can create an Issue about that. |
in my daily life the convention i adopt for interfaces as well as other codding patterns are the one usually used within the php community, |
Story was created here #350 |
Ok. So. I will create a branch for each subrefacoring task and will start some refactoring. Or how it’s better to do? PS: Personally i don’t agree with some MS recommendation. Aspacially about double quote and 4 spaces :) |
Yes a branch for each subrefactoring task is a better solution ;) I know, this is why you have created this topics :p |
Hahaha @Romakita totally right ;) |
or perhaps we could use prettier https://github.com/prettier/prettier \o/ i dont agree with some of their rules but in the end in the team i work on everything averages out... besides it has been mass adopted by many big open source projects out there |
So. Moved to the first comment of the issue |
Add to coding styles one more rule public set(target: Type<any> | symbol, provider: I) {
this.registry.merge(target, provider);
return this;
} Should be like that public set(target: Type<any> | symbol, provider: I) {
this.registry.merge(target, provider);
return this;
} Please vote for that with likes or dislikes |
No used variable.Changes have been done in https://github.com/Romakita/ts-express-decorators/tree/style-no-unused-variables branch. @Romakita Could you please check my commit comments plz? Thanks! |
@milewski Why not, prettier could be a nice solution :). Who work on this ? |
If you are all in favor of prettier I can do it... :) |
@milewski I'm totally for that if it will replace all double quotes to single and replaces all ident with 2 spaces... :D |
I have added to line new line before return. |
2 PRs created |
@milewski You can work on prettier ;) |
Hi all, There remains only this:
Otherwise, prettier work fine :) Good works guys ! |
@Romakita I think we can close the issue. |
Hello @Romakita
I would like to propose to change code style
I propose following:
I
. add tslint.const
instead oflet
if the variable is not reassignedany
if the type can be specified, can have exceptions<type>varName
->varName as type
Array<T>
->T[]
{format: format}
->{format}
new MyObject
->new MyObject()
The list is not finished.
Just want to discuss that and I can do some refactoring after.
Thanks!
Just put that decision on the top:
Use single quote instead of double quote2 space for indentation code, instead 4 spaceAll interfaces should start with I. add tslint. Issue #350
The text was updated successfully, but these errors were encountered: