Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Generated Components require a JSHint global definition for the top-level namespace #59

js1972 opened this Issue · 2 comments

2 participants

Jason Scott saschakiefer
Jason Scott

i.e. If we generate a component inside our app with namespace then JSHint will complain about the generated Component.js file that foo is not defined. Adding /*global foo*/ to the top of the file fixes this.

Should we ensure that generated files are all JSHint error free?

This issue applies to all generators - even the app generator. It just happens that we have sap defined as a global in .jshintrc which hides the error if you select the default namesace (sap.ui.demo) on your app.

Jason Scott js1972 self-assigned this
saschakiefer saschakiefer added this to the 0.2.2 milestone

I think that makes sense, but also depends a bit on how complex this might become...

saschakiefer saschakiefer removed the question label
Jason Scott
Jason Scott js1972 referenced this issue from a commit in js1972/generator-openui5
Jason Scott js1972 fix(sub generators): Add jshint global declaration for namespace in n…
…ew components.

When a uiComponent or facelessComponent is generated a namespace is prefixed.
JSHint will compain about the top-level object name in the namespace being
 undefined so we add it as a global:
 e.g. => add /*global foo*/ to top of file.

Fixes #59
Jason Scott js1972 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.