Skip to content

Commit 347236d

Browse files
committed
chore: fix prettier and lint commands
1 parent 519b339 commit 347236d

File tree

5 files changed

+17
-19
lines changed

5 files changed

+17
-19
lines changed

examples/basic-example/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ const render = Component => {
1414

1515
/* eslint-disable global-require, import/newline-after-import */
1616
render(require('./app').default);
17-
if (module.hot) module.hot.accept('./app', () => render(require('./app').default));
17+
if (module.hot)
18+
module.hot.accept('./app', () => render(require('./app').default));
1819
/* eslint-enable global-require, import/newline-after-import */

examples/externalNodeExample/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ const render = Component => {
1414

1515
/* eslint-disable global-require, import/newline-after-import */
1616
render(require('./app').default);
17-
if (module.hot) module.hot.accept('./app', () => render(require('./app').default));
17+
if (module.hot)
18+
module.hot.accept('./app', () => render(require('./app').default));
1819
/* eslint-enable global-require, import/newline-after-import */

examples/storybooks/add-remove.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import React, { Component } from 'react';
2-
import SortableTree, {
3-
addNodeUnderParent,
4-
removeNodeAtPath,
5-
} from '../../src';
2+
import SortableTree, { addNodeUnderParent, removeNodeAtPath } from '../../src';
63

74
const firstNames = [
85
'Abraham',

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"clean:demo": "rimraf build",
1010
"start": "cross-env NODE_ENV=development TARGET=development webpack-dev-server --inline --hot",
1111
"external-nodes-demo": "cross-env NODE_ENV=development TARGET=developmentExternal webpack-dev-server --inline --hot",
12-
"lint": "eslint src",
13-
"prettier": "prettier --single-quote --trailing-comma es5 --write \"src/**/*.js\"",
12+
"lint": "eslint src examples",
13+
"prettier": "prettier --single-quote --trailing-comma es5 --write \"{src,examples}/**/*.js\"",
1414
"prepublishOnly": "npm run lint && npm run test && npm run build",
1515
"test": "jest",
1616
"test:watch": "jest --watchAll",

src/react-sortable-tree.test.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,16 @@ describe('<SortableTree />', () => {
1414
beforeEach(() => {
1515
// Keep react-virtualized's AutoSizer component from hiding everything in
1616
// enzyme's rendering environment (which has no height/width, apparently)
17-
jest.spyOn(
18-
AutoSizer.prototype,
19-
'render'
20-
).mockImplementation(function renderOverride() {
21-
return (
22-
// eslint-disable-next-line
23-
<div ref={this._setRef}>
24-
{this.props.children({ width: 200, height: 99999 })}
25-
</div>
26-
);
27-
});
17+
jest
18+
.spyOn(AutoSizer.prototype, 'render')
19+
.mockImplementation(function renderOverride() {
20+
return (
21+
// eslint-disable-next-line
22+
<div ref={this._setRef}>
23+
{this.props.children({ width: 200, height: 99999 })}
24+
</div>
25+
);
26+
});
2827
});
2928

3029
it('should render nodes for flat data', () => {

0 commit comments

Comments
 (0)