ES7 decorators and ESLint no-undef errors

Converting your Ember app to use ESLint, as opposed to the default JSHint, is pretty straightfoward and useful, especially if you are considering to use newer EMCA features, such as decorators.

You might run into a strange no-undef syntax case if you decide to use something like ember-computed-decorators and dont define the property correctly though!

Take the following example:

@alias('person.first') firstName

That might seem right at first (as currently shown on the docs), but in reality firstName is an undefined variable. The solution is to simply set the required default (probably null) in such cases:

@alias('person.first') firstName: null

Hope that saves you some time!