Angular-cli: --no-semicolons Option to omit semicolons in generated code

Created on 12 Apr 2017  路  7Comments  路  Source: angular/angular-cli

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request

Desired functionality.


ng new --no-semicolons and subsequent ng generates should generate code without semicolons

I know this is a very bikesheddable topic so I don't want to start a flamewar on semicolons vs no-semicolons. But would it be a huge amount of work to have at least a --no-semicolon option?

It could be simple parsing-step at the end that applies /s/;// to the right files.

Most helpful comment

You can use the lint command to adjust your files, if desired.
Change the tslint rules and then run ng lint --fix.

There are too many formatting and style preferences out there to really allow the door to be opened on this type of change.

All 7 comments

You can use the lint command to adjust your files, if desired.
Change the tslint rules and then run ng lint --fix.

There are too many formatting and style preferences out there to really allow the door to be opened on this type of change.

true, didn't think of that. rest in peace, semicolons 馃槢

Hm I changed tslint.json but ng lint still complains about semicolons

Ah true, 'never' vs 'never'

This isn't just one of any number of lint switches. We've got this requirement from C and predecessor languages that JavaScript and TypeScript simply tolerates to accommodate legions of developers who cannot break the habit. I get that but there is no rationale (despite plenty of irrational nonsense) for using let alone continuing to use semi-colons except where required

@mockuniverse those opinions are your own, not objective reality. I don't use semis on my own projects either but 100% of my clients for the last eight years do.

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._

Was this page helpful?
0 / 5 - 0 ratings