You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@xg-wang I don't think the codemod should throw an error at all, necessarily. Arrow functions should be forbidden in computed properties, but it is not an error to use them if you don't reference this. In fact, the lint rule you linked to specifically has a configuration option to allow arrow functions in computed properties where this isn't referenced. Since that is technically valid code, the codemod should not error but instead successfully transform the code.
IMHO the hierarchy here is that throwing a useful error is better than today and actually fixing the transform to function properly would be better than that.
For example:
This code will throw
Chatted with @rwjblue, arrow function should be forbidden in computed properties: https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-arrow-function-computed-properties.md
The codemod should check
ArrowFunctionExpression
and throw a more meaningful error on this specific fileThe text was updated successfully, but these errors were encountered: