Improving jshint
- Including JS files under horizon/static/angular/ folder. - Adding .jshintrc to allow globals defined by jQuery, Angular, Angular mock, Jasmine, d3 and jsi18n. - Allowing global strict mode in spec files. Change-Id: I07359a4b3044cd5f675eef3b7df99398df909f81 Closes-Bug: #1419625
This commit is contained in:
parent
8bf6bfb957
commit
46b6a3b047
33
.jshintrc
Normal file
33
.jshintrc
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"browser": true,
|
||||
"trailing": true,
|
||||
"evil": true,
|
||||
|
||||
"globals": {
|
||||
"jQuery": false,
|
||||
"$": false,
|
||||
|
||||
"angular": false,
|
||||
"module": false,
|
||||
"inject": false,
|
||||
|
||||
"describe": false,
|
||||
"beforeEach": false,
|
||||
"afterEach": false,
|
||||
"beforeAll": false,
|
||||
"afterAll": false,
|
||||
"it": false,
|
||||
"expect": false,
|
||||
|
||||
"d3": false,
|
||||
|
||||
"pluralidx": false,
|
||||
"gettext": false,
|
||||
"ngettext": false,
|
||||
"gettext_noop": false,
|
||||
"pgettext": false,
|
||||
"npgettext": false,
|
||||
"interpolate": false,
|
||||
"get_format": false
|
||||
}
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
/* jshint globalstrict: true */
|
||||
'use strict';
|
||||
|
||||
describe('hz.widget.help-panel module', function() {
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* jshint globalstrict: true */
|
||||
'use strict';
|
||||
|
||||
describe('hz.widget.modal module', function(){
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* jshint globalstrict: true */
|
||||
'use strict';
|
||||
|
||||
describe('hz.widget.wizard module', function () {
|
||||
|
@ -157,6 +157,7 @@ function run_jshint {
|
||||
echo "Running jshint ..."
|
||||
jshint horizon/static/horizon/js
|
||||
jshint horizon/static/horizon/tests
|
||||
jshint horizon/static/angular/
|
||||
}
|
||||
|
||||
function warn_on_flake8_without_venv {
|
||||
|
Loading…
Reference in New Issue
Block a user