knownasilya / ember-template-imports

Pods + angle bracket component = modern Ember-y goodness
MIT License
14 stars 4 forks source link

feat: warn if imported variable value name not valid #2

Closed lifeart closed 5 years ago

lifeart commented 5 years ago

added isValidVariableName function, to check is valid template variable name or not. Looks like it can fix:

davewasmer commented 5 years ago

Thanks @lifeart 👏!

Two quick comments:

  1. Any reason we can't do a hard throw? If it's an invalid name, feels like we should do more than simply log a warning.

  2. Mind including tests? Should be pretty quick if you follow the pattern in the tests already.

lifeart commented 5 years ago

@davewasmer yeah, working on tests, how about console warn + <pre> Error description </pre injections into template? it should be very testable

lifeart commented 5 years ago

@davewasmer can you take a look?

davewasmer commented 5 years ago

:tada: This PR is included in version 1.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: