Skip to content

Commit d73c511

Browse files
author
Lucas Rebscher
committed
#199 Configure airbnb eslint plugin
* Add airbnb eslint package * Format two files as examples * Disable eslint prebuild commands to avoid reformatting the complete codebase at once
1 parent 72baf8e commit d73c511

5 files changed

Lines changed: 1865 additions & 2439 deletions

File tree

webapp/.eslintrc.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
module.exports = {
22
extends: [
3-
"./node_modules/@geppettoengine/geppetto-client/.eslintrc.js"
3+
'airbnb',
44
],
55
rules: {
6-
'multiline-comment-style': 0,
6+
// Turn off some rules so that we can improve the code step by step
7+
'class-methods-use-this': 0,
8+
'react/jsx-filename-extension': 0,
9+
10+
// Tweak some rules to our preferences
11+
'space-before-function-paren': ['error', 'always'],
712
},
813
globals: {
914
page: true,
@@ -14,6 +19,6 @@ module.exports = {
1419
pvdr: true,
1520
net1: true,
1621
CanvasContainer: true,
17-
patchRequire: true
18-
}
19-
};
22+
patchRequire: true,
23+
},
24+
};
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
import React, { Component } from 'react'
1+
import React, { Component } from 'react';
22

3-
import PythonConsole from '@geppettoengine/geppetto-client/js/components/interface/pythonConsole/PythonConsole';
3+
import PythonConsole
4+
from '@geppettoengine/geppetto-client/js/components/interface/pythonConsole/PythonConsole';
45

56
export class NetPyNEPythonConsole extends Component {
6-
7+
8+
componentDidMount () {
9+
}
10+
711
shouldComponentUpdate () {
812
return false;
913
}
1014

1115
componentWillUnmount () {
12-
console.info("unmounting python console");
16+
console.info('unmounting python console');
1317
}
1418

15-
componentDidMount () {
16-
17-
18-
}
1919
render () {
20-
return <PythonConsole pythonNotebookPath={"notebooks/notebook.ipynb"} />
20+
return <PythonConsole pythonNotebookPath="notebooks/notebook.ipynb" />;
2121
}
2222
}
2323

24-
2524
export default NetPyNEPythonConsole;

0 commit comments

Comments
 (0)