Skip to content

Commit d6a062c

Browse files
committed
chore: Appease the linter
1 parent cefe413 commit d6a062c

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/react-sortable-tree.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ ReactSortableTree.propTypes = {
602602
rowHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
603603

604604
// Size in px of the region near the edges that initiates scrolling on dragover
605-
slideRegionSize: PropTypes.number.isRequired, // eslint-disable-line react/no-unused-prop-types
605+
slideRegionSize: PropTypes.number,
606606

607607
// Custom properties to hand to the react-virtualized list
608608
// https://github.com/bvaughn/react-virtualized/blob/master/docs/List.md#prop-types
@@ -612,13 +612,13 @@ ReactSortableTree.propTypes = {
612612
scaffoldBlockPxWidth: PropTypes.number,
613613

614614
// Maximum depth nodes can be inserted at. Defaults to infinite.
615-
maxDepth: PropTypes.number, // eslint-disable-line react/no-unused-prop-types
615+
maxDepth: PropTypes.number,
616616

617617
// The method used to search nodes.
618618
// Defaults to a function that uses the `searchQuery` string to search for nodes with
619619
// matching `title` or `subtitle` values.
620620
// NOTE: Changing `searchMethod` will not update the search, but changing the `searchQuery` will.
621-
searchMethod: PropTypes.func, // eslint-disable-line react/no-unused-prop-types
621+
searchMethod: PropTypes.func,
622622

623623
// Used by the `searchMethod` to highlight and scroll to matched nodes.
624624
// Should be a string for the default `searchMethod`, but can be anything when using a custom search.
@@ -628,7 +628,7 @@ ReactSortableTree.propTypes = {
628628
searchFocusOffset: PropTypes.number,
629629

630630
// Get the nodes that match the search criteria. Used for counting total matches, etc.
631-
searchFinishCallback: PropTypes.func, // eslint-disable-line react/no-unused-prop-types
631+
searchFinishCallback: PropTypes.func,
632632

633633
// Generate an object with additional props to be passed to the node renderer.
634634
// Use this for adding buttons via the `buttons` key,
@@ -667,7 +667,7 @@ ReactSortableTree.propTypes = {
667667
canDrag: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),
668668

669669
// Determine whether a node can be dropped based on its path and parents'.
670-
canDrop: PropTypes.func, // eslint-disable-line react/no-unused-prop-types
670+
canDrop: PropTypes.func,
671671

672672
// When true, or a callback returning true, dropping nodes to react-dnd
673673
// drop targets outside of this tree will not remove them from this tree

src/utils/dnd-manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export default class DndManager {
133133
}
134134

135135
if (typeof this.customCanDrop === 'function') {
136-
const node = monitor.getItem().node;
136+
const { node } = monitor.getItem();
137137
const addedResult = memoizedInsertNode({
138138
treeData: this.treeData,
139139
newNode: node,

src/utils/tree-data-utils.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -788,9 +788,11 @@ function addNodeAtDepthAndIndex({
788788
});
789789

790790
if ('insertedTreeIndex' in mapResult) {
791-
insertedTreeIndex = mapResult.insertedTreeIndex;
792-
pathFragment = mapResult.parentPath;
793-
parentNode = mapResult.parentNode;
791+
({
792+
insertedTreeIndex,
793+
parentNode,
794+
parentPath: pathFragment,
795+
} = mapResult);
794796
}
795797

796798
childIndex = mapResult.nextIndex;

0 commit comments

Comments
 (0)