-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
New Linter Rule - set() must return a value #247
Comments
I just glanced at some of the other rules, and I'm not sure how to get started implementing this lol @clcuevas I believe you've done some things around return statements in the past (based on my codebase spelunking) - would you have any ideas or suggestions? |
@caseywatts my naive idea would be this: In the AST look for a You can use https://astexplorer.net/ to view the AST corresponding to any JS code you put in. |
@caseywatts Pretty much what @Turbo87 summarized. Wish I knew of Good luck! |
* Add new 'require-return-from-computed' rule. Fixes #247.
having a linter rule for this would help prevent some bugs
(at least until the behavior changes to be what people expect)
emberjs/rfcs#79
Bad:
Good
set()
must have areturn
.(I mistakenly created this over here first)
The text was updated successfully, but these errors were encountered: