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 "no-console" warning #1237

Merged
merged 2 commits into from
May 18, 2018
Merged

Fix ESLint "no-console" warning #1237

merged 2 commits into from
May 18, 2018

Conversation

jbruni
Copy link
Contributor

@jbruni jbruni commented May 14, 2018

What?

This PR fixes the following issue:

jbruni@vm:~/cornerstone$ stencil bundle
Validating theme...
Running ESLint...

/home/jbruni/cornerstone/assets/js/theme/common/product-details.js
  73:13  warning  Unexpected console statement  no-console

✖ 1 problem (0 errors, 1 warning)

Tickets / Documentation

N/A

Screenshots (if appropriate)

N/A

@bigbot
Copy link

bigbot commented May 14, 2018

Autotagging @bigcommerce/storefront-team @davidchin

@jbruni
Copy link
Contributor Author

jbruni commented May 14, 2018

I'm not sure if it is preferred to disable the ESLint rule, or to remove the console statement...

@@ -70,6 +70,7 @@ export default class ProductDetails {
}
}
} catch (e) {
/* eslint-disable no-console */
console.error(e);

Choose a reason for hiding this comment

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

Wouldn't it be more ideal to use console.error(e) // eslint-disable-line no-console? Just a preference on how we disable eslint modules for specific lines in projects on my end, so I could be absolutely wrong in how I'm using it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. I've updated it.

@mattolson mattolson merged commit 829a4ab into bigcommerce:master May 18, 2018
Ubersmake added a commit that referenced this pull request May 21, 2018
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.

4 participants