Conversation
| "edx-pattern-library": "~0.12.5", | ||
| "eslint": "~2.13.1", | ||
| "eslint-config-edx": "~1.2.1", | ||
| "eslint": "^3.16.0", |
There was a problem hiding this comment.
AFAIK we don't need an explicit ESLint dependency anymore now that we're on NPM 3 (although maybe the Yarn thing you found has implications for this?)
There was a problem hiding this comment.
Yep, we do need it since Yarn won't link binaries for transitive deps and recommends either an explicit dependency or a postinstall creating the link manually. The explicit dependency seemed like a cleaner option in this case.
| requests.currentIndex = 0; | ||
| requests.restore = function() { | ||
| if (xhr && xhr.hasOwnProperty('restore')) { | ||
| if (xhr && Object.prototype.hasOwnProperty.call(xhr, 'restore')) { |
There was a problem hiding this comment.
this is a little yucky - does && 'restore' in xhr work here?
|
|
||
| expect(requests instanceof Array).toBeTruthy(); | ||
| expect(requests.hasOwnProperty('currentIndex')).toBeTruthy(); | ||
| expect(Object.prototype.hasOwnProperty.call(requests, 'currentIndex')).toBeTruthy(); |
There was a problem hiding this comment.
I'd like to avoid these Object.prototype.x.call calls if we can, see above
There was a problem hiding this comment.
Agreed this is gross. 'prop' in object works here afaik and is much prettier 👍
eslint autofix manual eslint fixes less ugly hasOwnProperty alternative
8ef0754 to
3f8351d
Compare
Description
eslinteslint-config-edxandeslint-config-edx-es5Post-review