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

Implement trailing-comma tslint rule and enforce on generation #3966

Closed
intellix opened this issue Jan 12, 2017 · 4 comments
Closed

Implement trailing-comma tslint rule and enforce on generation #3966

intellix opened this issue Jan 12, 2017 · 4 comments

Comments

@intellix
Copy link
Contributor

intellix commented Jan 12, 2017

I'm working in a team of around 10 frontenders and there's 2 things which have given us no end of git conflicts over the years:

  • trailing commas
  • re-ordering of imports

Now we have a pre-compilation step, I'd like to enforce trailing commas for multi-line statements to avoid this:

<<<<<<< HEAD
'SomeModule'
=======
'SomeModule',
>>>>>>> branch-a

TSLint rule: https://palantir.github.io/tslint/rules/trailing-comma/

Is it possible to add trailing commas for multi-lines on the generation statements?

@Brocco
Copy link
Contributor

Brocco commented Jan 12, 2017

This is a stylistic decision which would best be handled with custom blueprints/templates when they are that implemented.

Leaving this issue open as a placeholder.

@cacogr
Copy link

cacogr commented Jan 12, 2017

I think a lot of things in angular-cli are stylistic decisions, it's opinionated after all. If it helps reducing conflicts and has no drawbacks I'd welcome it, at least as default behavior.

@filipesilva
Copy link
Contributor

Superseded by #6272, since that rule has a fixer it could be done there.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants