Skip to content
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

Develop selector validators compatible with spec #15

Closed
mgechev opened this issue Mar 30, 2016 · 3 comments
Closed

Develop selector validators compatible with spec #15

mgechev opened this issue Mar 30, 2016 · 3 comments

Comments

@mgechev
Copy link
Owner

mgechev commented Mar 30, 2016

Currently the selectors' validators are not compatible with spec.

@mgechev
Copy link
Owner Author

mgechev commented Oct 2, 2016

During the last meeting, we decided to use the CssSelector and it's parse method from @angular/compiler. This way we'll be able to have semantical check based on the selector type.

For instance, for @Components the check should look like:

const selector = CssSelector.parse(component.selector);
if (selector.element !== null) {
  // validate if it is a valid kebab-case elector, if not, throw a warning
} else {
  // throw a warning that the component doesn’t use element selector
}

Problem that needs to be considered if a mixture is used (i.e. component with element and attribute/class selector, etc.). We need to make sure we're aligned with the style guide.

@preslavsh
Copy link
Collaborator

#137 Needs reviewing

@mgechev
Copy link
Owner Author

mgechev commented Nov 13, 2016

Fixed by 3373dff.

@mgechev mgechev closed this as completed Nov 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants