Standardize breaks between methods

This commit is contained in:
Jordan Eldredge 2018-06-10 17:42:10 -07:00
parent db1994ce9f
commit 5c01de0268
6 changed files with 10 additions and 1 deletions

View file

@ -36,6 +36,7 @@
"dot-notation": "error",
"eqeqeq": ["error", "smart"],
"guard-for-in": "error",
"lines-between-class-members": "error",
"max-depth": ["warn", 4],
"max-params": ["warn", 5],
"new-cap": "error",

View file

@ -26,14 +26,17 @@ class App extends React.Component {
this._windowNodes = {};
this._bindings = {};
}
componentDidMount() {
this._setFocus();
}
componentDidUpdate(prevProps) {
if (prevProps.focused !== this.props.focused) {
this._setFocus();
}
}
_setFocus() {
const binding = this._bindings[this.props.focused];
if (binding.node) {
@ -68,6 +71,7 @@ class App extends React.Component {
}
};
}
_renderWindows() {
const {
media,
@ -123,6 +127,7 @@ class App extends React.Component {
}
});
}
render() {
const { closed, container, filePickers } = this.props;
if (closed) {

View file

@ -12,6 +12,7 @@ export default class ClickedDiv extends React.Component {
super(props);
this.state = { clicked: false };
}
render() {
return (
<div

View file

@ -24,6 +24,7 @@ class PlaylistShade extends React.Component {
_addedWidth() {
return this.props.playlistSize[0] * WINDOW_RESIZE_SEGMENT_WIDTH;
}
_trimmedName() {
const { name } = this.props;
if (name == null) {

View file

@ -10,6 +10,7 @@ export default class ResizeTarget extends React.Component {
super(props);
this.handleMouseDown = this.handleMouseDown.bind(this);
}
handleMouseDown(e) {
// Prevent dragging from highlighting text.
e.preventDefault();

View file

@ -8,7 +8,7 @@
"built/webamp.bundle.min.js"
],
"scripts": {
"lint": "jest --projects config/jest.eslint.js",
"lint": "eslint .",
"build": "webpack --config=config/webpack.prod.js",
"build-library": "webpack --config=config/webpack.library.js",
"prepublishOnly": "npm run build-library",