Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix eslint warning #1049

Merged
merged 10 commits into from
Feb 5, 2021
Merged

Conversation

VonOx
Copy link
Contributor

@VonOx VonOx commented Jan 20, 2021

  • warning Unexpected console statement no-console
  • CamelCase in WeatherBox

3 remaining warning, but I doesn't' know how to fix them:

/home/vonox/repos/GladysFork/front/src/routes/integration/all/zwave/setup-page/Node.jsx
  26:3  warning  Unexpected console statement  no-console

/home/vonox/repos/GladysFork/front/src/utils/Session.js
  38:5  warning  Unexpected console statement  no-console
  42:7  warning  Unexpected console statement  no-console

@codecov
Copy link

codecov bot commented Jan 20, 2021

Codecov Report

Merging #1049 (73a0233) into master (f14c89d) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1049   +/-   ##
=======================================
  Coverage   95.22%   95.22%           
=======================================
  Files         525      525           
  Lines        6968     6968           
=======================================
  Hits         6635     6635           
  Misses        333      333           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f14c89d...73a0233. Read the comment docs.

hotfix31
hotfix31 previously approved these changes Jan 22, 2021
atrovato
atrovato previously approved these changes Jan 23, 2021
Copy link
Contributor

@atrovato atrovato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :)

@cicoub13
Copy link
Contributor

3 remaining warning, but I doesn't' know how to fix them:

/home/vonox/repos/GladysFork/front/src/routes/integration/all/zwave/setup-page/Node.jsx
  26:3  warning  Unexpected console statement  no-console

/home/vonox/repos/GladysFork/front/src/utils/Session.js
  38:5  warning  Unexpected console statement  no-console
  42:7  warning  Unexpected console statement  no-console

For src/utils/Session.js, you can remove them (except the one line 59 to transform to console.error(e)). The feature is working well, and it's debugging stuff.
For zwave/setup-page/Node.jsx, I don't understand the usage but I think you can remove it too.

@VonOx
Copy link
Contributor Author

VonOx commented Jan 23, 2021

@cicoub13 thank you for feedback.

Node.jsx => is the output used to open Github Issue ?
https://github.com/GladysAssistant/Gladys/blob/master/front/src/routes/integration/all/zwave/setup-page/Node.jsx#L137

Or this is ok to replace by:

const displayRawNode = node => () => {};

@VonOx VonOx dismissed stale reviews from atrovato and hotfix31 via a6c8972 January 23, 2021 18:41
atrovato
atrovato previously approved these changes Jan 24, 2021
const displayRawNode = node => () => {
console.log(node);
};
const displayRawNode = node => () => {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this declaration and line 135 onClick={displayRawNode(props.node)}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ? This was done on purpose so that the user can see his full raw node in the console to help us debug!

Opening the full raw Z-Wave node in GitHub doesn't work because it's too big to fit it an URL

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK sorry. I thought the URL build was already containing the needed data.
In this case, @VonOx you must revert to keep the console.log and add this line above
// eslint-disable-next-line no-console

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries! I know it's really not ideal, we need to find another solution after that

cicoub13
cicoub13 previously approved these changes Jan 28, 2021
@Pierre-Gilles Pierre-Gilles merged commit a57aa68 into GladysAssistant:master Feb 5, 2021
atrovato pushed a commit to atrovato/Gladys that referenced this pull request Feb 21, 2021
* Fix a lot of eslint warning

* Fix Session and Node files

* Ignore eslint no-console in Node.jsx

// eslint-disable-next-line no-console

* WeatherBox => weatherIcon

Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>
@VonOx VonOx deleted the fix-test-warning branch April 20, 2021 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants