Skip to content

Commit 3c081c9

Browse files
committed
refactor(lint): Extend eslint:recommended
1 parent ed32ee7 commit 3c081c9

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

.eslintrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"parser": "babel-eslint",
3+
"extends": "eslint:recommended",
34
"plugins": [
45
"react"
56
],
@@ -24,6 +25,8 @@
2425
globals: {
2526
// For Flow
2627
"ReactElement",
27-
"ReactClass"
28+
"ReactClass",
29+
"$Shape",
30+
"MouseTouchEvent",
2831
}
2932
}

lib/Draggable.es6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export default class Draggable extends React.Component {
179179
// Can only determine if SVG after mounting
180180
isElementSVG: false
181181
};
182-
};
182+
}
183183

184184
componentWillMount() {
185185
if (this.props.position && !(this.props.onDrag || this.props.onStop)) {

lib/DraggableCore.es6

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,6 @@ export default class DraggableCore extends React.Component {
262262
let {x, y} = position;
263263

264264
// Snap to grid if prop has been provided
265-
if (x !== x) debugger;
266-
267265
if (Array.isArray(this.props.grid)) {
268266
let deltaX = x - this.state.lastX, deltaY = y - this.state.lastY;
269267
[deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY);

specs/.eslintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
env: {
3+
jasmine: true
4+
}
5+
}

specs/draggable.spec.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ describe('react-draggable', function () {
404404
const userSelectStyleStr = `${userSelectStyle}: none;`;
405405

406406
const dragElement = (
407-
<Draggable onDrag={function() { dragged = true; }}>
407+
<Draggable>
408408
<div />
409409
</Draggable>
410410
);

0 commit comments

Comments
 (0)