Skip to content

Commit 635b23f

Browse files
committed
chore(lint): Minor cleanup
1 parent eac7e08 commit 635b23f

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"globals": {
4646
// For Flow
4747
"ReactElement",
48-
"ReactClass"
48+
"ReactClass",
49+
"$PropertyType"
4950
}
5051
}

lib/ResponsiveReactGridLayout.jsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,25 +123,22 @@ export default class ResponsiveReactGridLayout extends React.Component {
123123
}
124124

125125
// wrap layouts so we do not need to pass layouts to child
126-
onLayoutChange = (layout) => {
126+
onLayoutChange = (layout: Layout) => {
127127
this.props.onLayoutChange(layout, {...this.props.layouts, [this.state.breakpoint]: layout});
128128
};
129-
onLayoutChange: (layout: Layout) => void;
130129

131130
/**
132131
* When the width changes work through breakpoints and reset state with the new width & breakpoint.
133132
* Width changes are necessary to figure out the widget widths.
134133
*/
135134
onWidthChange(nextProps: typeof ResponsiveReactGridLayout.prototype.props) {
136-
const {breakpoints, cols, verticalCompact} = nextProps;
135+
const {breakpoints, cols, layouts, verticalCompact} = nextProps;
137136
const newBreakpoint = nextProps.breakpoint || getBreakpointFromWidth(nextProps.breakpoints, nextProps.width);
138137

139138
const lastBreakpoint = this.state.breakpoint;
140139

141140
// Breakpoint change
142141
if (lastBreakpoint !== newBreakpoint || this.props.breakpoints !== breakpoints || this.props.cols !== cols) {
143-
const layouts = nextProps.layouts;
144-
145142
// Preserve the current layout if the current breakpoint is not present in the next layouts.
146143
if (!(lastBreakpoint in layouts)) layouts[lastBreakpoint] = cloneLayout(this.state.layout);
147144

webpack-dev-server.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module.exports = {
4343
}),
4444
],
4545
debug: true,
46-
devtool: "#cheap-module-source-map",
46+
devtool: "eval",
4747
publicPath: '/examples/',
4848
resolve: {
4949
extensions: ["", ".webpack.js", ".web.js", ".js", ".jsx"],

0 commit comments

Comments
 (0)