Skip to content

Commit e5f2d29

Browse files
committed
Build: Fix the jscs upgrade, disable some rules for now
1 parent 577fd07 commit e5f2d29

File tree

7 files changed

+25
-23
lines changed

7 files changed

+25
-23
lines changed

.jscsrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@
1515
"excludeFiles": [
1616
"node_modules/**",
1717
"dist/**"
18-
]
18+
],
19+
"maximumLineLength": null,
20+
"requireCamelCaseOrUpperCaseIdentifiers": null
1921
}

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ grunt.loadNpmTasks("grunt-contrib-uglify");
195195
grunt.loadNpmTasks("grunt-contrib-concat");
196196
grunt.loadNpmTasks("grunt-contrib-compress");
197197
grunt.loadNpmTasks("grunt-contrib-watch");
198-
grunt.loadNpmTasks("grunt-jscs-checker");
198+
grunt.loadNpmTasks("grunt-jscs");
199199
grunt.loadNpmTasks("grunt-contrib-copy");
200200
grunt.loadNpmTasks("grunt-text-replace");
201201

src/additional/dateITA.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ $.validator.addMethod("dateITA", function(value, element) {
2323
adata, gg, mm, aaaa, xdata;
2424
if ( re.test(value)) {
2525
adata = value.split("/");
26-
gg = parseInt(adata[0],10);
27-
mm = parseInt(adata[1],10);
28-
aaaa = parseInt(adata[2],10);
26+
gg = parseInt(adata[0], 10);
27+
mm = parseInt(adata[1], 10);
28+
aaaa = parseInt(adata[2], 10);
2929
xdata = new Date(aaaa, mm - 1, gg, 12, 0, 0, 0);
3030
if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
3131
check = true;

src/additional/iban.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ $.validator.addMethod("iban", function(value, element) {
99
}
1010

1111
// remove spaces and to upper case
12-
var iban = value.replace(/ /g,"").toUpperCase(),
12+
var iban = value.replace(/ /g, "").toUpperCase(),
1313
ibancheckdigits = "",
1414
leadingZeroes = true,
1515
cRest = "",
@@ -21,7 +21,7 @@ $.validator.addMethod("iban", function(value, element) {
2121
}
2222

2323
// check the country code and find the country specific format
24-
countrycode = iban.substring(0,2);
24+
countrycode = iban.substring(0, 2);
2525
bbancountrypatterns = {
2626
"AL": "\\d{8}[\\dA-Z]{16}",
2727
"AD": "\\d{8}[\\dA-Z]{12}",
@@ -105,7 +105,7 @@ $.validator.addMethod("iban", function(value, element) {
105105
}
106106

107107
// now check the checksum, first convert to digits
108-
ibancheck = iban.substring(4,iban.length) + iban.substring(0,4);
108+
ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);
109109
for (i = 0; i < ibancheck.length; i++) {
110110
charAt = ibancheck.charAt(i);
111111
if (charAt !== "0") {

src/additional/vinUS.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ $.validator.addMethod("vinUS", function(v) {
2323

2424
for (i = 0; i < 17; i++) {
2525
f = FL[i];
26-
d = v.slice(i,i + 1);
26+
d = v.slice(i, i + 1);
2727
if (i === 8) {
2828
cdv = d;
2929
}

src/core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ $.extend( $.validator, {
496496
.focus()
497497
// manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
498498
.trigger( "focusin" );
499-
} catch( e ) {
499+
} catch ( e ) {
500500
// ignore IE throwing errors when focusing hidden elements
501501
}
502502
}
@@ -613,7 +613,7 @@ $.extend( $.validator, {
613613
this.formatAndAdd( element, rule );
614614
return false;
615615
}
616-
} catch( e ) {
616+
} catch ( e ) {
617617
if ( this.settings.debug && window.console ) {
618618
console.log( "Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.", e );
619619
}

test/methods.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -999,9 +999,9 @@ function fillFormWithValuesAndExpect(formSelector, inputValues, expected) {
999999
test("require_from_group", function() {
10001000
$("#productInfo").validate({
10011001
rules: {
1002-
partnumber: { require_from_group: [ 2,".productInfo" ] },
1003-
description: { require_from_group: [ 2,".productInfo" ] },
1004-
discount: { require_from_group: [ 2,".productInfo" ] }
1002+
partnumber: { require_from_group: [ 2, ".productInfo" ] },
1003+
description: { require_from_group: [ 2, ".productInfo" ] },
1004+
discount: { require_from_group: [ 2, ".productInfo" ] }
10051005
}
10061006
});
10071007

@@ -1018,9 +1018,9 @@ test("require_from_group", function() {
10181018
test("require_from_group preserve other rules", function() {
10191019
$("#productInfo").validate({
10201020
rules: {
1021-
partnumber: { require_from_group: [ 2,".productInfo" ] },
1022-
description: { require_from_group: [ 2,".productInfo" ] },
1023-
color: { require_from_group: [ 2,".productInfo" ] },
1021+
partnumber: { require_from_group: [ 2, ".productInfo" ] },
1022+
description: { require_from_group: [ 2, ".productInfo" ] },
1023+
color: { require_from_group: [ 2, ".productInfo" ] },
10241024
supplier: { required: true }
10251025
}
10261026
});
@@ -1037,9 +1037,9 @@ test("require_from_group preserve other rules", function() {
10371037
test("skip_or_fill_minimum", function() {
10381038
$("#productInfo").validate({
10391039
rules: {
1040-
partnumber: { skip_or_fill_minimum: [ 2,".productInfo" ] },
1041-
description: { skip_or_fill_minimum: [ 2,".productInfo" ] },
1042-
color: { skip_or_fill_minimum: [ 2,".productInfo" ] }
1040+
partnumber: { skip_or_fill_minimum: [ 2, ".productInfo" ] },
1041+
description: { skip_or_fill_minimum: [ 2, ".productInfo" ] },
1042+
color: { skip_or_fill_minimum: [ 2, ".productInfo" ] }
10431043
}
10441044
});
10451045

@@ -1052,9 +1052,9 @@ test("skip_or_fill_minimum", function() {
10521052
test("skip_or_fill_minimum preserve other rules", function() {
10531053
$("#productInfo").validate({
10541054
rules: {
1055-
partnumber: { skip_or_fill_minimum: [ 2,".productInfo" ] },
1056-
description: { skip_or_fill_minimum: [ 2,".productInfo" ] },
1057-
color: { skip_or_fill_minimum: [ 2,".productInfo" ] },
1055+
partnumber: { skip_or_fill_minimum: [ 2, ".productInfo" ] },
1056+
description: { skip_or_fill_minimum: [ 2, ".productInfo" ] },
1057+
color: { skip_or_fill_minimum: [ 2, ".productInfo" ] },
10581058
supplier: { required: true }
10591059
}
10601060
});

0 commit comments

Comments
 (0)