-
Notifications
You must be signed in to change notification settings - Fork 11.9k
fix(@schematics/angular): add validation for component and directive class name #28552
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
fix(@schematics/angular): add validation for component and directive class name #28552
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution.
Can you please change the commit message scope from @angular/cli
to @schematics/angular
please?
@alan-agius4 I have updated the scope to @schematics/angular |
Please update the commit message and not the PR title, also one of the tests appear to be failing;
|
working on it. Will update the PR with the changes. |
a5eb495
to
454eb5e
Compare
@alan-agius4 I have updated the PR |
454eb5e
to
5afcaa6
Compare
@alan-agius4 husky is throwing error with module not found and its not able to lint the file. |
Can you try to run |
5afcaa6
to
1fd0ed4
Compare
1fd0ed4
to
2f9bef8
Compare
2f9bef8
to
a42660c
Compare
@alan-agius4 I have raised other PR #28566 for clean code as I messed git in this currenct PR. Sorry and Thanks. |
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. |
fix(@schematics/angular): add validation for component and directive class name
class names for directives and components when they are created using
ng generate component <className>
added tests for the changes made above
PR Checklist
Please check to confirm your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #28548
What is the new behavior?
When a component or directive is created using an invalid character, such as a class name that begins with a number or a component or directive name that contains only a number, cli will throw an error.
Does this PR introduce a breaking change?
Other information