Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Check for forbidden globals in Grunt build #255

Closed
jakub-g opened this Issue · 2 comments

2 participants

@jakub-g
Collaborator

There should be an error raised in Grunt build whenever window and document are used in the framework files (the same way as it is now in the Maven build).

@jakub-g
Collaborator

It looks that changing "browser" : true to false in jshint.json will do.

After this change, the current code base still passes the validation -- due to the way how we obtain global scope:

Aria.$global = (function () {
     return this;
 })();

but when introducing a reference to window or document, either the JSHint catches it and produces a warning (in most of the files), or the framework doesn't load (in case of bootstrap-included files) due to reference error in Node env.

@jakub-g jakub-g referenced this issue from a commit in jakub-g/ariatemplates
@jakub-g jakub-g fix #255 check for globals in Grunt build
Close #260.
c57dccd
@jakub-g
Collaborator

Actually we could move require AT in https://github.com/ariatemplates/ariatemplates/blob/master/build/grunt-tasks/task-normalizeskin.js inside the task function normalizeskin, so JSHint can execute even in case of syntax errors in core AT files.

@piuccio piuccio closed this in 763f622
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.