Skip to content

Commit

Permalink
Eslint front: Add no-console rule + clean (#2023)
Browse files Browse the repository at this point in the history
  • Loading branch information
cicoub13 authored Feb 6, 2024
1 parent 3c38e31 commit 5ecc4ff
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 9 deletions.
3 changes: 2 additions & 1 deletion front/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"selector": "CallExpression[callee.object.name='store'][callee.property.name='setState']",
"message": "Usage of unistore is not recommended anymore, please use local states instead."
} */
]
],
"no-console": ["error", { "allow": ["error"] }]
},
"env": {
"browser": true
Expand Down
3 changes: 0 additions & 3 deletions front/src/components/boxs/camera/Camera.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ class CameraBoxComponent extends Component {
}
});
this.hls.on(Hls.Events.MEDIA_ATTACHED, () => {});
this.hls.on(Hls.Events.MANIFEST_PARSED, (event, data) => {
console.log(`manifest loaded, found ${data.levels.length} quality level`);
});
this.hls.on(Hls.Events.ERROR, (event, data) => {
console.error(event, data);
const errorType = data.type;
Expand Down
1 change: 0 additions & 1 deletion front/src/components/boxs/camera/EditCamera.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ class EditCameraBoxComponent extends Component {

updateCameraLiveAutoStart = e => {
const newValue = e.target.checked;
console.log({ newValue });
this.props.updateBoxConfig(this.props.x, this.props.y, {
camera_live_auto_start: newValue
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ class RoomTemperatureBoxComponent extends Component {
temperature_max = DEFAULT_VALUE_TEMPERATURE.MAXIMUM;
}

console.log('unit', unit);

if (unit === DEVICE_FEATURE_UNITS.FAHRENHEIT) {
temperature_min = celsiusToFahrenheit(temperature_min);
temperature_max = celsiusToFahrenheit(temperature_min);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class DiscoverTab extends Component {
await this.setState({ loading: true });
await this.getStatus();
await this.getConfiguration();
console.log('Finish init');
await this.setState({ loading: false });
};

Expand Down
1 change: 0 additions & 1 deletion front/src/routes/scene/edit-scene/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ class EditScene extends Component {
};

updateSceneIcon = e => {
console.log('updateSceneIcon', e.target.value);
this.setState(prevState => {
const newState = update(prevState, {
scene: {
Expand Down

0 comments on commit 5ecc4ff

Please sign in to comment.