Permalink
Browse files

Build: Update grunt task, fix jscs:good files

  • Loading branch information...
1 parent fd96d70 commit 554985b1b31e2ab7f01271cb4099c03fa75f7b32 @apsdehal apsdehal committed with arschmitz Mar 20, 2016
Showing with 117 additions and 110 deletions.
  1. +5 −2 .jscsrc
  2. +1 −1 build/files.js
  3. +1 −1 build/release.js
  4. +1 −1 build/tasks/alias.js
  5. +1 −1 build/tasks/cssbuild.js
  6. +6 −6 build/tasks/modules.js
  7. +2 −2 build/tasks/options/copy.js
  8. +1 −1 build/tasks/options/coveralls.js
  9. +5 −1 build/tasks/options/jscs.js
  10. +2 −2 build/tasks/options/qunit.js
  11. +1 −1 js/widgets/controlgroup.backcompat.js
  12. +6 −6 js/widgets/fixedToolbar.backcompat.js
  13. +4 −4 js/widgets/fixedToolbar.js
  14. +1 −1 js/widgets/fixedToolbar.tapToggle.js
  15. +13 −13 js/widgets/forms/slider.js
  16. +1 −1 js/widgets/loader.backcompat.js
  17. +1 −1 js/widgets/navbar.morebutton.js
  18. +1 −1 js/widgets/popup.js
  19. +1 −1 js/widgets/toolbar.js
  20. +1 −1 tests/integration/dialog/dialog_events.js
  21. +2 −2 tests/integration/fixed-toolbar/fixedToolbar.js
  22. +16 −16 tests/integration/listview/listview_core.js
  23. +7 −7 tests/integration/navigation/navigation_core.js
  24. +2 −2 tests/integration/popup/popup_core.js
  25. +1 −1 tests/integration/select/select_cached.js
  26. +1 −1 tests/integration/select/select_core.js
  27. +1 −1 tests/unit/degrade-inputs/degradeInputs.js
  28. +1 −1 tests/unit/fixed-toolbar/fixedToolbar.js
  29. +1 −1 tests/unit/flipswitch/flipswitch_backcompat.js
  30. +1 −1 tests/unit/flipswitch/flipswitch_core.js
  31. +1 −1 tests/unit/init/init_dialog.js
  32. +6 −6 tests/unit/loader/loader_core.js
  33. +1 −1 tests/unit/navbar/navbar_backcompat.js
  34. +1 −1 tests/unit/navbar/navbar_core.js
  35. +2 −2 tests/unit/pagecontainer/pagecontainer_core.js
  36. +3 −3 tests/unit/panel/panel_core.js
  37. +1 −1 tests/unit/rangeslider/rangeslider_backcompat.js
  38. +3 −3 tests/unit/rangeslider/rangeslider_core.js
  39. +2 −2 tests/unit/slider/slider_backcompat.js
  40. +1 −1 tests/unit/slider/slider_core.js
  41. +6 −6 tests/unit/slider/slider_events.js
  42. +2 −2 tests/unit/textinput/textinput_core.js
View
@@ -1,3 +1,6 @@
{
- "preset": "jquery"
-}
+ "preset": "jquery",
+
+ // We want to output all errors
+ "maxErrors": 1000000
+}
View
@@ -125,4 +125,4 @@ files.googleCDNZipOut = path.join( path.join( "<%= dist %>", "cdn-google" ),
files.zipFileName );
return files;
-}
+};
View
@@ -92,7 +92,7 @@ Release.define( {
// If it's a prerelease the option should not be selected
// and need to be inserted in the unstable optgroup
newOption = "<option value='" + Release.newVersion + "'>" + Release.newVersion +
- "</option>\n\t\t"
+ "</option>\n\t\t";
option = $( "select#branch optgroup[label='Unstable'] option" ).eq( 0 );
} else {
@@ -1,6 +1,6 @@
module.exports = function( grunt ) {
-// ci is a magic task that changes based on options we do this to optimize travis build
+// Ci is a magic task that changes based on options we do this to optimize travis build
grunt.registerTask( "ci", [ "ci:" + ( grunt.option( "citype" ) || process.env.CITYPE ) ] );
grunt.registerTask( "ci:demos", [ "test:demos" ] );
grunt.registerTask( "ci:test", [ "test", "coveralls" ] );
@@ -37,7 +37,7 @@ grunt.registerMultiTask( "cssbuild", "Resolve CSS @imports and concat files", fu
async.series( [
function( next ) {
- // pull the includes together using require js
+ // Pull the includes together using require js
requirejs.optimize(
_.extend( {
cssIn: src,
@@ -156,19 +156,19 @@ grunt.registerTask( "modules", function() {
} else {
item.import =
- // url(
+ // Url(
match[ 1 ] +
- // quotation mark
+ // Quotation mark
match[ 2 ].charAt( 0 ) +
- // path adjusted to be relative to the
+ // Path adjusted to be relative to the
// temporary directory
path.relative( destinationPath,
path.normalize( path.join( cssFilePath,
filename ) ) ) +
- // quotation mark
+ // Quotation mark
match[ 2 ].charAt( 0 ) +
// )
@@ -209,7 +209,7 @@ grunt.registerTask( "modules", function() {
// directory
file = path.relative( destinationPath,
- // css files are originally relative to "js/"
+ // Css files are originally relative to "js/"
path.join( "js", file ) );
cssFileContents += "@import url(\"" + file + "\");\n";
} );
@@ -228,7 +228,7 @@ grunt.registerTask( "modules", function() {
// directory
file = path.relative( destinationPath,
- // css files are originally relative to "js/"
+ // Css files are originally relative to "js/"
path.join( "js", file ) );
cssFileContents += "@import url(\"" + file + "\");\n";
} );
@@ -71,7 +71,7 @@ var processDemos = function( content, srcPath ) {
return prefix + " " + group.join( "," ) + " ";
} );
- //element.html( text );
+ //Element.html( text );
element[ 0 ].children[ 0 ].data = text;
}
} );
@@ -220,7 +220,7 @@ return {
}
} );
- // write out newly created file contents
+ // Write out newly created file contents
content = $.html();
} else if ( /\.js$/.test( srcPath ) ) {
@@ -7,4 +7,4 @@ module.exports = {
// LCOV coverage file relevant to every target
src: "_tests/reports/lcov/lcov.info"
}
-}
+};
@@ -1,4 +1,8 @@
-module.exports = {
+module.exports = function( grunt ) {
+return {
+ options: {
+ config: true
+ },
build: {
src: [ "build/**/*.js", "*.js" ]
},
@@ -138,7 +138,7 @@ return {
var found = false;
excludes.forEach( function( exclude ) {
if ( new RegExp( exclude ).test( path ) ) {
- found = true
+ found = true;
}
} );
return !found;
@@ -150,5 +150,5 @@ return {
}() )
}
}
-}
+};
};
@@ -37,7 +37,7 @@ $.widget( "ui.controlgroup", $.ui.controlgroup, {
options: {
shadow: false,
- //corners: true,
+ //Corners: true,
type: "vertical",
mini: false
},
@@ -99,7 +99,7 @@ if ( $.mobileBackcompat !== false ) {
this._workarounds();
},
- //check the browser and version and run needed workarounds
+ //Check the browser and version and run needed workarounds
_workarounds: function() {
var ua = navigator.userAgent,
@@ -136,15 +136,15 @@ if ( $.mobileBackcompat !== false ) {
return offset;
},
- //bind events for _triggerRedraw() function
+ //Bind events for _triggerRedraw() function
_bindScrollWorkaround: function() {
var self = this;
- //bind to scrollstop and check if the toolbars are correctly positioned
+ //Bind to scrollstop and check if the toolbars are correctly positioned
this._on( this.window, { scrollstop: function() {
var viewportOffset = self._viewportOffset();
- //check if the header is visible and if its in the right place
+ //Check if the header is visible and if its in the right place
if ( viewportOffset > 2 && self._visible ) {
self._triggerRedraw();
}
@@ -172,10 +172,10 @@ if ( $.mobileBackcompat !== false ) {
_triggerRedraw: function() {
var paddingBottom = parseFloat( $( ".ui-page-active" ).css( "padding-bottom" ) );
- //trigger page redraw to fix incorrectly positioned fixed elements
+ //Trigger page redraw to fix incorrectly positioned fixed elements
$( ".ui-page-active" ).css( "padding-bottom", ( paddingBottom + 1 ) + "px" );
- //if the padding is reset with out a timeout the reposition will not occure.
+ //If the padding is reset with out a timeout the reposition will not occure.
//this is independent of JQM the browser seems to need the time to react.
setTimeout( function() {
$( ".ui-page-active" ).css( "padding-bottom", paddingBottom + "px" );
@@ -96,7 +96,7 @@ return $.widget( "mobile.toolbar", $.mobile.toolbar, {
if ( transitionClass && transitionClass !== "none" ) {
- // use appropriate slide for header or footer
+ // Use appropriate slide for header or footer
if ( transitionClass === "slide" ) {
transitionClass = this.role === "header" ? "slidedown" : "slideup";
}
@@ -108,7 +108,7 @@ return $.widget( "mobile.toolbar", $.mobile.toolbar, {
_bindPageEvents: function() {
var page = ( !!this.page ) ? this.element.closest( ".ui-page" ) : this.document;
- //page event bindings
+ //Page event bindings
// Fixed toolbars require page zoom to be disabled, otherwise usability issues crop up
// This method is meant to disable zoom while a fixed-positioned toolbar page is visible
this._on( page, {
@@ -165,7 +165,7 @@ return $.widget( "mobile.toolbar", $.mobile.toolbar, {
// This behavior only applies to "fixed", not "fullscreen"
if ( this.options.fullscreen ) { return; }
- // tbPage argument can be a Page object or an event, if coming from throttled resize.
+ // TbPage argument can be a Page object or an event, if coming from throttled resize.
tbPage = ( tbPage && tbPage.type === undefined && tbPage ) ||
this.page || $el.closest( ".ui-page" );
tbPage = ( !!this.page ) ? this.page : ".ui-page-active";
@@ -211,7 +211,7 @@ return $.widget( "mobile.toolbar", $.mobile.toolbar, {
hide: function( notransition ) {
- // if it's a slide transition, our new transitions need the
+ // If it's a slide transition, our new transitions need the
// reverse class as well to slide outward
var outClass = this.options.transition === "slide" ? " reverse" : "";
@@ -53,7 +53,7 @@ return $.widget( "mobile.toolbar", $.mobile.toolbar, {
var self = this,
o = self.options;
- // tap toggle
+ // Tap toggle
page
.bind( "vclick", function( e ) {
if ( o.tapToggle && !$( e.target ).closest( o.tapToggleBlacklist ).length ) {
@@ -101,7 +101,7 @@ $.widget( "mobile.slider", $.extend( {
mouseMoved: false
} );
- // monitor the input for updated values
+ // Monitor the input for updated values
this._addClass( "ui-slider-input" );
this._on( control, {
@@ -121,14 +121,14 @@ $.widget( "mobile.slider", $.extend( {
slider.insertAfter( control );
- // wrap in a div for styling purposes
+ // Wrap in a div for styling purposes
if ( !isRangeslider ) {
wrapper = "<div class='ui-slider'></div>";
control.add( slider ).wrapAll( wrapper );
}
- // bind the handle event callbacks and set the context to the widget instance
+ // Bind the handle event callbacks and set the context to the widget instance
this._on( this.handle, {
"vmousedown": "_handleVMouseDown",
"keydown": "_handleKeydown",
@@ -163,15 +163,15 @@ $.widget( "mobile.slider", $.extend( {
_controlKeyup: function( /* event */ ) {
- // necessary?
+ // Necessary?
this.refresh( this._value(), true, true );
},
_controlBlur: function( /* event */ ) {
this.refresh( this._value(), true );
},
- // it appears the clicking the up and down buttons in chrome on
+ // It appears the clicking the up and down buttons in chrome on
// range/number inputs doesn't trigger a change until the field is
// blurred. Here we check thif the value has changed and refresh
_controlVMouseUp: function( /* event */ ) {
@@ -211,7 +211,7 @@ $.widget( "mobile.slider", $.extend( {
break;
}
- // move the slider according to the keypress
+ // Move the slider according to the keypress
switch ( event.keyCode ) {
case $.mobile.keyCode.HOME:
this.refresh( this.min );
@@ -277,13 +277,13 @@ $.widget( "mobile.slider", $.extend( {
}
if ( this.dragging && !this.options.disabled ) {
- // this.mouseMoved must be updated before refresh() because it will be
+ // This.mouseMoved must be updated before refresh() because it will be
// used in the control "change" event
this.mouseMoved = true;
this.refresh( event );
- // only after refresh() you can calculate this.userModified
+ // Only after refresh() you can calculate this.userModified
this.userModified = this.beforeStart !== this.element[ 0 ].selectedIndex;
return false;
}
@@ -321,7 +321,7 @@ $.widget( "mobile.slider", $.extend( {
this.disable();
}
- // set the stored value for comparison later
+ // Set the stored value for comparison later
this.value = this._value();
this._addClass( this.handle, null, "ui-button ui-shadow" );
@@ -334,7 +334,7 @@ $.widget( "mobile.slider", $.extend( {
if ( typeof val === "object" ) {
data = val;
- // a slight tolerance helped get to the ends of the slider
+ // A slight tolerance helped get to the ends of the slider
tol = 8;
left = this.slider.offset().left;
@@ -363,7 +363,7 @@ $.widget( "mobile.slider", $.extend( {
newval = ( percent / 100 ) * ( max - min ) + min;
- //from jQuery UI slider, the following source will round to the nearest step
+ //From jQuery UI slider, the following source will round to the nearest step
valModStep = ( newval - min ) % step;
alignValue = newval - valModStep;
@@ -411,7 +411,7 @@ $.widget( "mobile.slider", $.extend( {
this.valuebg.css( "width", percent + "%" );
}
- // drag the label widths
+ // Drag the label widths
if ( this._labels ) {
handlePercent = this.handle.width() / this.slider.width() * 100;
aPercent = percent && handlePercent + ( 100 - handlePercent ) * percent / 100;
@@ -426,7 +426,7 @@ $.widget( "mobile.slider", $.extend( {
if ( !preventInputUpdate ) {
valueChanged = false;
- // update control"s value
+ // Update control"s value
valueChanged = parseFloat( control.val() ) !== newval;
control.val( newval );
@@ -29,7 +29,7 @@ if ( $.mobileBackcompat !== false ) {
$.widget( "mobile.loader", $.mobile.loader, {
options: {
- // custom html for the inner content of the loading message
+ // Custom html for the inner content of the loading message
html: ""
},
@@ -77,7 +77,7 @@ return $.widget( "mobile.navbar", $.mobile.navbar, {
this._addClass( popupNav, "ui-navbar-popupnav" );
popupNav.appendTo( popupDiv );
- // enhance buttons and move to new rows
+ // Enhance buttons and move to new rows
for ( pos = 0; pos < buttonCount; pos++ ) {
buttonItem = navItems.eq( pos );
this._makeNavButton( buttonItem.find( "a" ), iconpos );
View
@@ -259,7 +259,7 @@ $.widget( "mobile.popup", {
// We detach the payload, add the classes, and then insert it into the popup container
this.element.detach();
- // this._ui needs to be fully established before we can all this._addClasses(), because
+ // This._ui needs to be fully established before we can all this._addClasses(), because
// this._addClasses() uses this._ui, but we don't want any of the UI elements to be
// attached, so as to avoid reflows as this._addClasses() adds classes.
this._addClasses();
@@ -94,7 +94,7 @@ $.widget( "mobile.toolbar", {
this._addHeadingClasses();
},
- //we only want this to run on non fixed toolbars so make it easy to override
+ //We only want this to run on non fixed toolbars so make it easy to override
_setRelative: function() {
$( "[data-" + $.mobile.ns + "role='page']" ).css( { "position": "relative" } );
},
@@ -1,5 +1,5 @@
/*
- * mobile dialog unit tests
+ * Mobile dialog unit tests
*/
( function( QUnit, $ ) {
var home = $.mobile.path.parseUrl( location.pathname ).directory,
Oops, something went wrong.

0 comments on commit 554985b

Please sign in to comment.