-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Allow comments in .angular-cli.json #5610
Comments
JSON file can not contain comments! |
JSON format doesn't allow comments. This is not a limitation with the CLI. It's a limitation of JSON itself. |
Closing as the community already answered this, thanks guys! |
Actually, let's keep this open... I misread it as a bug report, but it's a very reasonable feature request. |
Sorry if you have answered it elsewhere, but can this file actually be a |
@bekos no, that is not supported. |
@filipesilva This would help if we actually needed a bit different setup for production and development setups in angular-cli. Does this make sense for a new feature request? |
@bekos I'm curious on the particulars of your scenario. Can you open a new issue to discuss your request? |
Would be nice to use https://www.npmjs.com/package/strip-json-comments const json = '{/*rainbows*/"unicorn":"cake"}';
JSON.parse(stripJsonComments(json));
//=> {unicorn: 'cake'} |
I think |
I think this is a great feature and the tsconfig.json also allows comments, microsoft/TypeScript#4987. The config files need comments for clarification and future reading. |
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version. If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
v1.0.0
Repro steps.
ng s
The log given by the failure.
InvalidConfigError: Parsing .angular-cli.json failed. Please make sure your .angular-cli.json is valid JSON. Error:
SyntaxError: Unexpected token / in JSON at position 533
Desired functionality.
Would be really great to be able to put comments to that file. :)
The text was updated successfully, but these errors were encountered: