Skip to content

Commit 771337b

Browse files
author
Lucas Rebscher
committed
Run eslint on codebase with most recent config
1 parent 6546900 commit 771337b

39 files changed

Lines changed: 1738 additions & 1841 deletions

webapp/components/NetPyNE.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,21 +115,21 @@ class NetPyNE extends React.Component {
115115
<div className={classes.root}>
116116
<div className={classes.container}>
117117
<div className={classes.topbar}>
118-
<Topbar/>
118+
<Topbar />
119119
</div>
120120
<Box p={1} flex={1} display="flex" alignItems="stretch">
121121
<Grid container spacing={1} className={classes.content} alignItems="stretch">
122122
<Grid item className={classes.noGrow}>
123-
<Drawer/>
123+
<Drawer />
124124
</Grid>
125125
<Grid item>
126-
<Layout/>
126+
<Layout />
127127
</Grid>
128128
</Grid>
129129
</Box>
130130
</div>
131-
<Dialog/>
132-
<ErrorDialog/>
131+
<Dialog />
132+
<ErrorDialog />
133133
</div>
134134
);
135135
}

webapp/components/definition/cellRules/NetPyNECellRule.js

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,24 @@ import DialogActions from '@material-ui/core/DialogActions';
99
import DialogContent from '@material-ui/core/DialogContent';
1010
import DialogContentText from '@material-ui/core/DialogContentText';
1111
import DialogTitle from '@material-ui/core/DialogTitle';
12-
import Utils from '../../../Utils';
1312
import { withStyles } from '@material-ui/core/styles';
13+
import Utils from '../../../Utils';
1414

1515
class NetPyNECellRule extends React.Component {
16-
1716
constructor (props) {
1817
super(props);
1918
this.state = {
2019
currentName: props.name,
2120
errorMessage: undefined,
22-
errorDetails: undefined
21+
errorDetails: undefined,
2322
};
2423
}
2524

26-
handleRenameChange = event => {
27-
var storedValue = this.props.name;
28-
var newValue = Utils.nameValidation(event.target.value);
29-
var updateCondition = this.props.renameHandler(newValue);
30-
var triggerCondition = Utils.handleUpdate(updateCondition, newValue, event.target.value, this, 'CellRule');
25+
handleRenameChange = (event) => {
26+
const storedValue = this.props.name;
27+
const newValue = Utils.nameValidation(event.target.value);
28+
const updateCondition = this.props.renameHandler(newValue);
29+
const triggerCondition = Utils.handleUpdate(updateCondition, newValue, event.target.value, this, 'CellRule');
3130

3231
if (triggerCondition) {
3332
this.triggerUpdate(() => {
@@ -53,9 +52,9 @@ class NetPyNECellRule extends React.Component {
5352
}
5453

5554
postProcessMenuItems (pythonData, selected) {
56-
return pythonData.map(name => (
55+
return pythonData.map((name) => (
5756
<MenuItem
58-
id={name + 'MenuItem'}
57+
id={`${name}MenuItem`}
5958
key={name}
6059
checked={selected.indexOf(name) > -1}
6160
value={name}
@@ -67,29 +66,32 @@ class NetPyNECellRule extends React.Component {
6766

6867
render () {
6968
const { classes } = this.props;
70-
var dialogPop = (this.state.errorMessage !== undefined ? (
71-
<Dialog
72-
open={true}
73-
style={{ whiteSpace: 'pre-wrap' }}>
74-
<DialogTitle id="alert-dialog-title">{this.state.errorMessage}</DialogTitle>
75-
<DialogContent style={{ overflow: 'auto' }}>
76-
<DialogContentText id="alert-dialog-description">
77-
{this.state.errorDetails}
78-
</DialogContentText>
79-
</DialogContent>
80-
<DialogActions>
81-
<Button
82-
variant="contained"
83-
color="primary"
84-
onClick={() => this.setState({
85-
errorMessage: undefined,
86-
errorDetails: undefined
87-
})}
88-
>BACK</Button>
89-
</DialogActions>
90-
</Dialog>
91-
)
92-
: undefined
69+
const dialogPop = (this.state.errorMessage !== undefined ? (
70+
<Dialog
71+
open
72+
style={{ whiteSpace: 'pre-wrap' }}
73+
>
74+
<DialogTitle id="alert-dialog-title">{this.state.errorMessage}</DialogTitle>
75+
<DialogContent style={{ overflow: 'auto' }}>
76+
<DialogContentText id="alert-dialog-description">
77+
{this.state.errorDetails}
78+
</DialogContentText>
79+
</DialogContent>
80+
<DialogActions>
81+
<Button
82+
variant="contained"
83+
color="primary"
84+
onClick={() => this.setState({
85+
errorMessage: undefined,
86+
errorDetails: undefined,
87+
})}
88+
>
89+
BACK
90+
</Button>
91+
</DialogActions>
92+
</Dialog>
93+
)
94+
: undefined
9395
);
9496
return (
9597
<div>
@@ -101,15 +103,17 @@ class NetPyNECellRule extends React.Component {
101103
value={this.state.currentName}
102104
disabled={this.renaming}
103105
label="The name of the cell type"
104-
id={'cellRuleName'}
106+
id="cellRuleName"
105107
/>
106108

107109
<Box m={1}>
108110
<Button
109111
variant="contained"
110112
color="secondary"
111113
onClick={() => this.props.HandleAddNewSection()}
112-
>Add new section</Button>
114+
>
115+
Add new section
116+
</Button>
113117
</Box>
114118

115119
</div>
@@ -121,18 +125,18 @@ class NetPyNECellRule extends React.Component {
121125

122126
const styles = ({
123127
shape,
124-
spacing
128+
spacing,
125129
}) => ({
126130
expandable: {
127131
borderRadius: shape.borderRadius,
128132
backgroundColor: 'inherit',
129133
paddingTop: spacing(2),
130-
'&::before': { content: 'unset' }
134+
'&::before': { content: 'unset' },
131135
},
132136
root: {
133137
display: 'flex',
134-
flexDirection: 'column'
135-
}
138+
flexDirection: 'column',
139+
},
136140
});
137141

138142
export default withStyles(styles)(NetPyNECellRule);

0 commit comments

Comments
 (0)