| Summary: | [linting] Do not warn about arguments.callee and arguments.caller if not in a functional scope | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 8.0 | ||
| Target Milestone: | 9.0 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
Fix + tests: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=f12fa7c1d7047203d1770e0a713b9147c271b0f8 also updated the rule to check for arguments['callee'] and arguments['caller']. |
Consider the following snippet: var arguments = { callee: 1 } arguments.callee; The 'callee' part will be tagged as deprecated (when it shouldn't be) we should only be warning about the use when inside functions, like: function f() { arguments.callee(); } and var f = function f() { arguments.callee(); } and function* f() { yield arguments.caller(); } var f = function* f() { yield* arguments.caller(); }