Skip to content

Commit b58eee1

Browse files
committed
Fix JSHint issues
1 parent 93c18d5 commit b58eee1

File tree

6 files changed

+8
-11
lines changed

6 files changed

+8
-11
lines changed

.jshintrc

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"strict": true,
1818
"trailing": true,
1919
"smarttabs": true,
20+
"validthis": true,
2021
"globals": {
2122

2223
// Libraries
@@ -29,6 +30,7 @@
2930
"SwaggerClient": false,
3031
"hljs": false,
3132
"SwaggerUi": false,
33+
"define": false,
3234

3335
// Global object
3436
// TODO: remove these

.travis.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,4 @@ install:
66
- export DISPLAY=:99.0
77
- sh -e /etc/init.d/xvfb start
88
- npm i -g jshint
9-
- npm install
10-
11-
script:
12-
- jshint .
13-
- npm test
9+
- npm install

dist/swagger-ui.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
(function(){'use strict';
88

9-
var SwaggerUi = Backbone.Router.extend({
9+
window.SwaggerUi = Backbone.Router.extend({
1010

1111
dom_id: 'swagger_ui',
1212

@@ -201,7 +201,6 @@ var SwaggerUi = Backbone.Router.extend({
201201

202202
});
203203

204-
window.SwaggerUi = SwaggerUi;
205204
window.SwaggerUi.Views = {};
206205

207206
// don't break backward compatibility with previous versions and warn users to upgrade their code

dist/swagger-ui.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"scripts": {
99
"build": "./node_modules/gulp/bin/gulp.js;",
1010
"serve": "./node_modules/gulp/bin/gulp.js serve;",
11+
"pretest": "jshint .",
1112
"test": "./node_modules/gulp/bin/gulp.js; ./node_modules/mocha/bin/mocha"
1213
},
1314
"repository": {

src/main/javascript/SwaggerUi.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
var SwaggerUi = Backbone.Router.extend({
3+
window.SwaggerUi = Backbone.Router.extend({
44

55
dom_id: 'swagger_ui',
66

@@ -195,7 +195,6 @@ var SwaggerUi = Backbone.Router.extend({
195195

196196
});
197197

198-
window.SwaggerUi = SwaggerUi;
199198
window.SwaggerUi.Views = {};
200199

201200
// don't break backward compatibility with previous versions and warn users to upgrade their code

0 commit comments

Comments
 (0)