Skip to content
Permalink
Browse files

JSCS: Validate JSDoc comment blocks

  • Loading branch information...
nschonni committed Dec 2, 2013
1 parent cc813ac commit 7b64de87bf8396ba22e9dc3ea84a6fe379997c30
Showing with 222 additions and 224 deletions.
  1. +6 −1 .jscs.json
  2. +2 −2 src/core/helpers.js
  3. +16 −18 src/core/wb.js
  4. +3 −3 src/plugins/ajax-fetch/ajax-fetch.js
  5. +1 −1 src/plugins/cal-events/cal-events.js
  6. +3 −3 src/plugins/calendar/calendar.js
  7. +15 −14 src/plugins/carousel/carousel.js
  8. +1 −1 src/plugins/country-content/country-content.js
  9. +2 −2 src/plugins/data-ajax/data-ajax.js
  10. +3 −4 src/plugins/data-inview/data-inview.js
  11. +3 −3 src/plugins/data-picture/data-picture.js
  12. +1 −1 src/plugins/data-picture/test.js
  13. +4 −4 src/plugins/equalheight/equalheight.js
  14. +5 −5 src/plugins/favicon/favicon.js
  15. +3 −3 src/plugins/feedback/feedback.js
  16. +5 −5 src/plugins/feeds/feeds.js
  17. +1 −1 src/plugins/focus/focus.js
  18. +2 −2 src/plugins/footnotes/footnotes.js
  19. +2 −2 src/plugins/formvalid/formvalid.js
  20. +2 −2 src/plugins/lightbox/lightbox.js
  21. +18 −17 src/plugins/menu/menu.js
  22. +12 −15 src/plugins/modal/modal.js
  23. +3 −3 src/plugins/multimedia/multimedia.js
  24. +2 −2 src/plugins/navcurrent/navcurrent.js
  25. +2 −2 src/plugins/overlay/overlay.js
  26. +1 −1 src/plugins/prettify/test.js
  27. +3 −3 src/plugins/resize/resize.js
  28. +11 −11 src/plugins/session-timeout/session-timeout.js
  29. +7 −7 src/plugins/share/share.js
  30. +2 −2 src/plugins/tables/tables.js
  31. +21 −21 src/plugins/tabs/tabs.js
  32. +2 −2 src/plugins/texthighlight/texthighlight.js
  33. +21 −21 src/plugins/toggle/toggle.js
  34. +2 −2 src/plugins/twitter/twitter.js
  35. +2 −2 src/plugins/wb-disable/disable.js
  36. +18 −21 src/polyfills/datalist/datalist.js
  37. +4 −4 src/polyfills/datepicker/datepicker.js
  38. +2 −2 src/polyfills/details/details.js
  39. +3 −3 src/polyfills/mathml/mathml.js
  40. +3 −3 src/polyfills/meter/meter.js
  41. +2 −2 src/polyfills/progress/progress.js
  42. +1 −1 src/polyfills/svg/svg.js
@@ -1,3 +1,8 @@
{
"requireLineFeedAtFileEnd": true
"requireLineFeedAtFileEnd": true,
"validateJSDoc": {
"checkParamNames": true,
"checkRedundantParams": true,
"requireParamTypes": true
}
}
@@ -1,4 +1,4 @@
/*
/**
* @title WET-BOEW JQuery Helper Methods
* @overview Helper methods for WET
* @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
@@ -33,7 +33,7 @@
return selector.replace( /([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, "\\$1" );
};

/*
/**
* @namespace wb.string
*/
wb.string = {
@@ -1,7 +1,4 @@
/*!
/*! WET-BOEW Core and Plugins */
/*
/**
* @title WET-BOEW Vapour loader
* @overview Helper methods for WET
* @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
@@ -13,9 +10,9 @@
(function( $, window, document, undef ) {
"use strict";

/*
/**
* @method getUrlParts
* @params: {String} of URL to examine
* @param {String} url of URL to examine
* @return {Object} of the parts of passed URL
*/
var getUrlParts = function( url ) {
@@ -50,20 +47,20 @@ var getUrlParts = function( url ) {
};
},

/*
/**
* @variable $src
* @return {jQuery Element} of wb script element
*/
$src = $( "script[src$='wet-boew.js'],script[src$='wet-boew.min.js']" )
.last(),

/*
/**
* @variable i18n
* @return {string} of HTML document language
*/
lang = document.documentElement.lang,

/*
/**
* @variable $homepath
* @return {string} of version current path to JS directory
*/
@@ -72,20 +69,20 @@ var getUrlParts = function( url ) {
.slice( 0, -1 )
.join( "/" ),

/*
/**
* @variable $homecss
* @return {string} of version current path to CSS directory
*/
$homecss = $homepath.substring( 0, $homepath.length - 2 ) + "css",

/*
/**
* @variable $mode
* @return {string} of version of JS [development or production]
*/
$mode = $src.prop( "src" )
.indexOf( ".min" ) < 0 ? "" : ".min",

/*
/**
* @variable oldie
* @return {integer} of IE version
*/
@@ -103,13 +100,13 @@ var getUrlParts = function( url ) {
return v > 4 ? v : undef;
}()),

/*
/**
* @variable currentpage
* @return {Object} of parts of the current page URL
*/
currentpage = getUrlParts( window.location.href ),

/*
/**
* @variable disabled
* @return {boolean} of state of disabled flag
*/
@@ -175,7 +172,8 @@ var getUrlParts = function( url ) {

start: function() {

/* Lets start our clock right away. We we need to test to ensure that there will not be any
/*
* Lets start our clock right away. We we need to test to ensure that there will not be any
* instances on Mobile were the DOM is not ready before the timer starts. That is why 0.5 seconds
* was used as a buffer.
*/
@@ -224,15 +222,15 @@ window.wb = wb;
* increase performance due to redundant chaining of the prefixes.
*/

/*
/**
* @prefix: site! - adds the root js directory of yepnope resources
*/
yepnope.addPrefix( "site", function( resourceObj ) {
resourceObj.url = $homepath + "/" + resourceObj.url;
return resourceObj;
});

/*
/**
* @prefix: plyfll! - builds the path for the polyfill resource
*/
yepnope.addPrefix( "plyfll", function( resourceObj ) {
@@ -255,7 +253,7 @@ yepnope.addPrefix( "plyfll", function( resourceObj ) {
return resourceObj;
});

/*
/**
* @prefix: i18n! - adds the correct document language for our i18n library
*/
yepnope.addPrefix( "i18n", function( resourceObj ) {
@@ -1,4 +1,4 @@
/*
/**
* @title WET-BOEW Ajax Fetch [ ajax-fetch ]
* @overview A basic AjaxLoader wrapper for WET-BOEW
* @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
@@ -15,9 +15,9 @@
*/
var $document = wb.doc,

/*
/**
* @method generateSerial
* @param {integer} Length of the random string to be generated
* @param {integer} len Length of the random string to be generated
*/
generateSerial = function( len ) {
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",
@@ -1,4 +1,4 @@
/*
/**
* @title WET-BOEW Events Calendar
* @overview Dynamically generates a calendar interface for navigating a list of events.
* @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
@@ -1,4 +1,4 @@
/*
/**
* @title WET-BOEW Calendar library
* @overview A library for building calendar interfaces
* @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
@@ -17,7 +17,7 @@
var $document = wb.doc,
i18n, i18nText,

/*
/**
* Creates a calendar instance
* @method create
*/
@@ -399,7 +399,7 @@ var $document = wb.doc,
( month < 9 ? "0" : "" ) + ( month + 1 ) + "-" + ( dayCount < 10 ? "0" : "" ) + dayCount + "'><span class='wb-inv'>" + textWeekDayNames[ day ] +
( frenchLang ? ( " </span>" + dayCount + "<span class='wb-inv'> " + textMonthNames[ month ].toLowerCase() + " " ) :
( " " + textMonthNames[ month ] + " </span>" + dayCount + "<span class='wb-inv'> " ) ) + year +
( isCurrentDate ? textCurrentDay : "" ) + "</span></time></div></td>";
( isCurrentDate ? textCurrentDay : "" ) + "</span></time></div></td>";

if ( dayCount > lastDay ) {
breakAtEnd = true;
@@ -1,4 +1,4 @@
/*
/**
* @title Carousel
* @overview Dynamically stacks multiple images and captions into a carousel (or slider) widget.
* @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
@@ -13,12 +13,12 @@
* not once per instance of plugin on the page. So, this is a good place to define
* variables that are common to all instances of the plugin on a page.
*/
var selector = ".wb-carousel",
var selector = ".wb-carousel",
$document = wb.doc,
i18n, i18nText,
controls = selector + " [role=tablist] a",

/*
/**
* @method onTimerPoke
* @param {jQuery DOM element} $elm The plugin element
*/
@@ -48,7 +48,7 @@
$elm.data( "ctime", delay );
},

/*
/**
* @method createControls
* @param {jQuery DOM element} $tablist The plugin element
*/
@@ -80,9 +80,10 @@
$sldr.addClass( "inited" );
},

/*
/**
* @method drizzleAria
* @param {2 jQuery DOM element} $tabs for the tabpanel grouping, and $tablist for the pointers to the groupings
* @param {jQuery DOM element} $tabs The tabpanel grouping
* @param {jQuery DOM element} $tabList The pointers to the groupings
*/
drizzleAria = function( $tabs, $tabList ) {

@@ -97,7 +98,7 @@
for ( ; tabCounter !== -1; tabCounter -= 1 ) {
item = tabs[ tabCounter ];
isActive = item.className.indexOf( "in" ) !== -1;

item.tabIndex = isActive ? "0" : "-1";
item.setAttribute( "aria-hidden", isActive ? "false" : "true" );
item.setAttribute( "aria-expanded", isActive ? "true" : "false" );
@@ -118,7 +119,7 @@
$tabList.attr( "aria-live", "off" );
},

/*
/**
* @method onInit
* @param {jQuery DOM element} $elm The plugin element
*/
@@ -164,14 +165,14 @@
});
},

/*
/**
* @method onShift
* @param {jQuery DOM element} $sldr The plugin element
* @param {jQuery DOM element} $elm The selected link from the tablist
*/
onPick = function( $sldr, $elm ) {
var $items = $sldr.data( "tabs" ),
$controls = $sldr.data( "tablist" );
$controls = $sldr.data( "tablist" );

$items.filter( ".in" )
.removeClass( "in" )
@@ -208,7 +209,7 @@
.addClass( "active" );
},

/*
/**
* @method onShift
* @param {jQuery DOM element} $elm The plugin element
*/
@@ -248,7 +249,7 @@
.attr( "aria-selected", "true" );
},

/*
/**
* @method onShift
* @param {jQuery DOM element} $elm The plugin element
* @param {integer} shifto The item to shift to
@@ -312,7 +313,7 @@
$sldr = $elm
.parents( selector )
.attr( "data-ctime", 0 );

// Spacebar
if ( which > 36 ) {
onCycle( $elm, which < 39 ? -1 : 1 );
@@ -327,7 +328,7 @@

text = elm.getElementsByTagName( "i" )[ 0 ];
text.innerHTML = text.innerHTML === playText ? i18nText.pause : playText;

inv = $elm.find( ".wb-inv" )[ 0 ];
inv.innerHTML = inv.innerHTML === rotStopText ? i18nText.rotStart : rotStopText;
} else {
@@ -1,4 +1,4 @@
/*
/**
* @title WET-BOEW Country Content
* @overview A basic AjaxLoader wrapper that inserts AJAXed in content based on a visitors country as resolved by http://freegeoip.net
* @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
@@ -1,4 +1,4 @@
/*
/**
* @title WET-BOEW Data Ajax [data-ajax-after], [data-ajax-append],
* [data-ajax-before], [data-ajax-prepend] and [data-ajax-replace]
* @overview A basic AjaxLoader wrapper that inserts AJAXed-in content
@@ -19,7 +19,7 @@ var $document = wb.doc,
selector = "[data-ajax-after], [data-ajax-append], [data-ajax-before], " +
"[data-ajax-prepend], [data-ajax-replace]",

/*
/**
* Init runs once per plugin element on the page. There may be multiple
* elements. It will run more than once per plugin if you don't remove the
* selector from the timer.
@@ -1,4 +1,4 @@
/*
/**
* @title WET-BOEW Data InView
* @overview A simplified data-attribute driven plugin that responds to moving in and out of the viewport.
* @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
@@ -18,7 +18,7 @@ var selector = ".wb-inview",
$document = wb.doc,
$window = wb.win,

/*
/**
* Init runs once per plugin element on the page. There may be multiple elements.
* It will run more than once per plugin if you don't remove the selector from the timer.
* @method init
@@ -32,10 +32,9 @@ var selector = ".wb-inview",
$elm.trigger( "scroll.wb-inview" );
},

/*
/**
* @method onInView
* @param {jQuery DOM element} $elm The plugin element
* @param {jQuery Event} event The event that triggered this method call
*/
onInView = function( $elm ) {
var elementWidth = $elm.outerWidth(),
@@ -1,4 +1,4 @@
/*
/**
* @title WET-BOEW Data Picture
* @overview Event driven port of the Picturefill library: https://github.com/scottjehl/picturefill
* @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
@@ -16,7 +16,7 @@
var selector = "[data-picture]",
$document = wb.doc,

/*
/**
* Init runs once per plugin element on the page. There may be multiple elements.
* It will run more than once per plugin if you don't remove the selector from the timer.
* @method init
@@ -30,7 +30,7 @@ var selector = "[data-picture]",
$elm.trigger( "picturefill.wb-data-picture" );
},

/*
/**
* Updates the image displayed according to media queries.
* This is the logic ported from Picturefill.
* @method picturefill
@@ -1,4 +1,4 @@
/*
/**
* @title data-picture Plugin Unit Tests
* @overview Test the data-picture plugin behaviour
* @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
Oops, something went wrong.

0 comments on commit 7b64de8

Please sign in to comment.
You can’t perform that action at this time.