-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
[BUG] Trailing commas throw error when parsing routes #192
Comments
Edit: I spoke too fast. Not only you are using the latest version, but it still doesn't work in 1.0.0-beta.9. This is most likely due to the usage of a JSON parser to parse the routes in route.parser.ts. I would recommend switching to the json5 parser. It is an unofficial superset of json that allows for trailing commas and comments. This is exactly what we want here. If a project maintainer is ok with adding a dependency, I would be glad to work on a PR. |
I was completely wrong, sorry. I edited my comment above. |
@maxencefrenette |
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context. |
Overview of the issue
If there are trailing commas in the routes definition,
compodoc
throws an error:Operating System, Node.js, npm, compodoc version(s)
Angular configuration, a
package.json
file in the root folderCompodoc installed globally or locally ?
Globally
Motivation for or Use Case
The project I am working on is using
tslint
to enforce styles. Part of the styleguide requires trailing commas. Changing the rule and entire repo is not possible at this time, so the only way to solve the error is to disabletslint
around each of the routing declarations.Reproduce the error
compodoc
:./node_modules/.bin/compodoc -p src/tsconfig.app.json
The text was updated successfully, but these errors were encountered: