Add Linting - #293
Conversation
|
I haven't squashed the commits to make it easier to review, but can do so before merging. |
0633ff7 to
0b10b56
Compare
diasbruno
left a comment
There was a problem hiding this comment.
Awesome PR! Hope my comments make sense.
| } | ||
| }; | ||
| }, | ||
| static afterClose = () => { |
There was a problem hiding this comment.
Should be preferable to declare as function instead of assign a anonymous function to a variable?
static afterClose() {...}There was a problem hiding this comment.
Sounds good, fixed.
| handleKeyDown: function(event) { | ||
| if (event.keyCode == 9 /*tab*/) scopeTab(this.refs.content, event); | ||
| if (event.keyCode == 27 /*esc*/) { | ||
| handleKeyDown = (event) => { |
There was a problem hiding this comment.
Changing it here doesn't work because we want the arrow functions binding. See section 5 of this blog post for more info.
There was a problem hiding this comment.
Thanks for sharing this. I completely forgot that arrow function are bounded to the current instance.
| handleContentMouseUp = () => { | ||
| this.shouldClose = false; | ||
| }, | ||
| } |
There was a problem hiding this comment.
Yep, but same response as last time too :)
| } | ||
|
|
||
| exports.markForFocusLater = function() { | ||
| exports.markForFocusLater = function markForFocusLater () { |
There was a problem hiding this comment.
It can be written as...
export function markForFocusLater() { ... }There was a problem hiding this comment.
oops, I think export keyword must be enabled. So, it can be setup or keep the exports.markForFocusLater.
There was a problem hiding this comment.
Hmm... can't believe I missed that. I'll fix it right up :)
| } | ||
|
|
||
| module.exports = findTabbableDescendants; | ||
| function findTabbableDescendants (element) { |
There was a problem hiding this comment.
export function findTabbableDescendants (element) {|
|
||
| module.exports = function(node, event) { | ||
| var tabbable = findTabbable(node); | ||
| module.exports = function scopeTab (node, event) { |
There was a problem hiding this comment.
export function scopeTab (node, event) {0b10b56 to
c481226
Compare
|
@diasbruno Alright... I've addressed all your changes :) |
* Add linting * Make specs pass linter * Make lib/helpers pass linter * Make lib/components pass linter This also does some signfiicant refactoring of the code to appease the linter's pro-ES2015+ stance. closes reactjs#289 closes reactjs#286 * Make travis run the lint task as well as specs closes reactjs#284
* Add linting * Make specs pass linter * Make lib/helpers pass linter * Make lib/components pass linter This also does some signfiicant refactoring of the code to appease the linter's pro-ES2015+ stance. closes reactjs#289 closes reactjs#286 * Make travis run the lint task as well as specs closes reactjs#284
* Add linting * Make specs pass linter * Make lib/helpers pass linter * Make lib/components pass linter This also does some signfiicant refactoring of the code to appease the linter's pro-ES2015+ stance. closes reactjs#289 closes reactjs#286 * Make travis run the lint task as well as specs closes reactjs#284
Fixes #284
Changes proposed:
Acceptance Checklist:
CONTRIBUTING.md.