Skip to content

Commit 58bcc62

Browse files
committed
#291 linting
1 parent 4f5b21d commit 58bcc62

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

webapp/components/general/NetPyNEThumbnail.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const styles = {
2525
};
2626

2727
export default class NetPyNEThumbnail extends React.Component {
28-
constructor(props) {
28+
constructor (props) {
2929
super(props);
3030
this.state = {
3131
dialogOpen: false,
@@ -34,30 +34,36 @@ export default class NetPyNEThumbnail extends React.Component {
3434
this.handleDialogBox = this.handleDialogBox.bind(this);
3535
}
3636

37-
handleClick() {
37+
handleClick () {
3838
if (this.props.handleClick) {
3939
this.props.handleClick(this.props.name, true);
4040
}
4141
}
4242

43-
handleDialogBox(actionConfirmed) {
44-
if (this.props.handleClick && actionConfirmed) {
43+
handleDialogBox (actionConfirmed) {
44+
const {
45+
handleClick, paramPath, name, onDelete, deleteNetParamsObj,
46+
} = this.props;
47+
if (handleClick && actionConfirmed) {
4548
// this.props.deleteMethod(this.props.name);
46-
this.props.deleteNetParamsObj({ paramPath: this.props.paramPath, paramName: this.props.name });
47-
this.props.onDelete && this.props.onDelete();
49+
deleteNetParamsObj({
50+
paramPath,
51+
paramName: name,
52+
});
53+
tonDelete && onDelete();
4854
}
4955
this.setState({ dialogOpen: false });
5056
}
5157

52-
getCommonProps() {
58+
getCommonProps () {
5359
return {
5460
id: this.props.name,
5561
color: this.props.selected ? 'primary' : 'secondary',
5662
onClick: () => this.handleClick(),
5763
};
5864
}
5965

60-
render() {
66+
render () {
6167
const {
6268
name, selected, isButton = false, isCog = false,
6369
} = this.props;

webapp/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"repository": "https://github.com/MetaCell/NetPyNE-UI",
66
"license": "MIT",
77
"scripts": {
8+
"lint": "eslint . --color --fix",
89
"build": "webpack --mode development -p --progress --devtool source-map",
910
"build-dev": "webpack --mode development --devtool source-map",
1011
"build-dev-noTest": "webpack --mode development --devtool source-map --env.noTest=true",

0 commit comments

Comments
 (0)