-
Notifications
You must be signed in to change notification settings - Fork 12k
ng generate should use tslint configuration #6192
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
Comments
@clydin has suggested a similar approach, to automatically use tslints fix option on generated files according to a option/flag. I think that's a good compromise for these stylistic issues. |
@filipesilva But tslint doesn't fix indent issues. This must do be done manually and this isn't optimal. Optimal would be some kind of configuration which would be used by ng generate. tslint.json already offers this configuration. |
Not completely ideal, but most editors offer a formatting option to quickly handle whitespace issues. With the referenced PR, |
@filipesilva @clydin But then should - at least - ng generate call tslint on the newly generated ts files otherwise the developer had to do it for each file. The request already exists: palantir/tslint#2350 |
The referenced PR (#6213) essentially does what you're suggesting and will be included in an upcoming version. |
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.
Repro steps.
Execute
ng generate component test --module=app.module --spec=false
Behavior
When you open test.component.ts the indention is set to space and the strings are surrounded by '
In my tslint.json I set the following (extraction):
Desired functionality.
ng generate should - at least (further settings are also welcome) - use the indention and quotemarks that are configured in tslint.
The text was updated successfully, but these errors were encountered: