Skip to content

Commit 142388d

Browse files
author
Artyom 'Sleepwalker' Fedosov
committed
Update Grunt and packages, fix code style
1 parent b14b796 commit 142388d

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

Gruntfile.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = function(grunt) {
1+
module.exports = function (grunt) {
22
grunt.loadNpmTasks('grunt-contrib-jshint');
33
grunt.loadNpmTasks('grunt-jscs');
44

@@ -19,9 +19,10 @@ module.exports = function(grunt) {
1919
options: {
2020
preset: 'airbnb',
2121
validateIndentation: '\t',
22-
disallowMultipleVarDecl: null,
23-
requireMultipleVarDecl: true,
24-
requireCurlyBraces: ['if', 'else', 'for', 'while', 'do', 'try', 'catch', 'case']
22+
requireCurlyBraces: ['if', 'else', 'for', 'while', 'do', 'try', 'catch', 'case'],
23+
requireTrailingComma: false,
24+
requirePaddingNewLinesAfterBlocks: false,
25+
requireDollarBeforejQueryAssignment: false
2526
}
2627
}
2728
});

lib/jquery-ui.tabs.neighbors.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* https://github.com/asleepwalker/jquery-ui.tabs.neighbors.js
55
*/
66

7-
(function($) {
7+
(function ($) {
88

99
var originalCreate = $.ui.tabs.prototype._create;
1010

@@ -19,13 +19,13 @@
1919
prev: false,
2020
next: false
2121
},
22-
_create: function() {
23-
var _this = this,
24-
s,
25-
_widget = _this.widget(),
26-
isAutoplayPaused = true,
27-
timeoutMsec = 1000 * _this.options.autoplayTimeout,
28-
timeoutID;
22+
_create: function () {
23+
var _this = this;
24+
var s;
25+
var _widget = _this.widget();
26+
var isAutoplayPaused = true;
27+
var timeoutMsec = 1000 * _this.options.autoplayTimeout;
28+
var timeoutID;
2929

3030
originalCreate.call(_this);
3131

@@ -46,11 +46,11 @@
4646
timeoutID = window.setTimeout(next, timeoutMsec);
4747
}
4848

49-
_widget.on('tabsbeforeactivate', function() {
49+
_widget.on('tabsbeforeactivate', function () {
5050
window.clearTimeout(timeoutID);
5151
});
5252

53-
_widget.on('tabsactivate', function() {
53+
_widget.on('tabsactivate', function () {
5454
if (!isAutoplayPaused) {
5555
timeoutID = window.setTimeout(next, timeoutMsec);
5656
}
@@ -83,7 +83,7 @@
8383
}
8484

8585
},
86-
pause: function() {
86+
pause: function () {
8787
// $('#tabs').tabs('pause')
8888
this.pauseAutoplay();
8989
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"jquery-ui": ">=1.0"
3232
},
3333
"devDependencies": {
34-
"grunt": "~0.4.5",
35-
"grunt-contrib-jshint": "~0.11.0",
36-
"grunt-jscs": "~1.5.0"
34+
"grunt": "~1.0.1",
35+
"grunt-contrib-jshint": "~1.1.0",
36+
"grunt-jscs": "~3.0.1"
3737
}
3838
}

0 commit comments

Comments
 (0)