question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deprecation warning for camelCase event names cannot be suppressed

See original GitHub issue

https://github.com/ngVue/ngVue/blob/bb89707ae1d9fc81d0405676ab1140cd15a1c22b/src/index.js#L63

This warning was introduced in #83 - however, it cannot be suppressed.

A common pattern is to use NodeJS-style environment variables which can be configured in webpack:

if (process && process.env && process.env.NODE_ENV === 'development'`) {
   logger.warn('Be sure to do these things before this project is shipped')
} else {
   // be silent
}

https://webpack.js.org/plugins/environment-plugin/

Reproduce:

(1) Include ngVue in a productionized project, either using a <script> tag or importing using ES6 modules.

Expected:

  • No deprecation warning occurs merely by including the code

Actual:

  • Deprecation warning occurs merely by including the code.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jaredmcateercommented, May 21, 2019

Ah I see the problem, I assumed that BABEL_ENV was just some alias/polyfill for variables like NODE_ENV when using Babel, but I actually have to set BABEL_ENV=test in my env variables even though we don’t use it.

1reaction
nicolaspayotcommented, May 9, 2019

@scottmmjackson yes you’re totally right! Thanks for the PR. I’ll review it right away.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the list of valid @SuppressWarnings warning names ...
In The Java Tutorials unchecked and deprecation are listed as the two warnings required by The Java Language Specification, therefore, they should be...
Read more >
vue/custom-event-name-casing
This rule aims to warn the custom event names other than the configured casing. (Default is camelCase.) Vue 2 recommends using kebab-case ...
Read more >
JSHint Options Reference
This option allows you to force all variable names to use either camelCase style or UPPER_CASE with underscores. Warning This option has been...
Read more >
Zalando RESTful API and Event Guidelines
MUST define events compliant with overall API guidelines; MUST treat events as ... See also MUST property names must be snake_case (and never...
Read more >
Warn-by-default Lints - The rustc book
Dead code may signal a mistake or unfinished code. To silence the warning for individual items, prefix the name with an underscore such...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found