Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable disallowMultipleVarDecl JSCS check. #469

Merged
merged 1 commit into from
Mar 9, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions dist/js/ratchet.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
'use strict';

var findModals = function (target) {
var i, modals = document.querySelectorAll('a');
var i;
var modals = document.querySelectorAll('a');

for (; target && target !== document; target = target.parentNode) {
for (i = modals.length; i--;) {
if (modals[i] === target) {
Expand Down Expand Up @@ -57,7 +59,9 @@
var popover;

var findPopovers = function (target) {
var i, popovers = document.querySelectorAll('a');
var i;
var popovers = document.querySelectorAll('a');

for (; target && target !== document; target = target.parentNode) {
for (i = popovers.length; i--;) {
if (popovers[i] === target) {
Expand Down Expand Up @@ -523,7 +527,9 @@
};

var findTarget = function (target) {
var i, toggles = document.querySelectorAll('a');
var i;
var toggles = document.querySelectorAll('a');

for (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) {
if (toggles[i] === target) {
Expand Down Expand Up @@ -618,7 +624,9 @@
'use strict';

var getTarget = function (target) {
var i, segmentedControls = document.querySelectorAll('.segmented-control .control-item');
var i;
var segmentedControls = document.querySelectorAll('.segmented-control .control-item');

for (; target && target !== document; target = target.parentNode) {
for (i = segmentedControls.length; i--;) {
if (segmentedControls[i] === target) {
Expand Down Expand Up @@ -695,7 +703,9 @@
var scrollableArea;

var getSlider = function (target) {
var i, sliders = document.querySelectorAll('.slider > .slide-group');
var i;
var sliders = document.querySelectorAll('.slider > .slide-group');

for (; target && target !== document; target = target.parentNode) {
for (i = sliders.length; i--;) {
if (sliders[i] === target) {
Expand Down Expand Up @@ -816,7 +826,9 @@
var toggle = false;

var findToggle = function (target) {
var i, toggles = document.querySelectorAll('.toggle');
var i;
var toggles = document.querySelectorAll('.toggle');

for (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) {
if (toggles[i] === target) {
Expand Down
5 changes: 4 additions & 1 deletion docs/assets/js/fingerblast.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
var deactivate = this.deactivate.bind(this);

function contains (element, ancestor) {
var descendants, index, descendant;
var descendants;
var index;
var descendant;

if ('compareDocumentPosition' in ancestor) {
return !!(ancestor.compareDocumentPosition(element) & 16);
} else if ('contains' in ancestor) {
Expand Down
24 changes: 18 additions & 6 deletions docs/dist/js/ratchet.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
'use strict';

var findModals = function (target) {
var i, modals = document.querySelectorAll('a');
var i;
var modals = document.querySelectorAll('a');

for (; target && target !== document; target = target.parentNode) {
for (i = modals.length; i--;) {
if (modals[i] === target) {
Expand Down Expand Up @@ -57,7 +59,9 @@
var popover;

var findPopovers = function (target) {
var i, popovers = document.querySelectorAll('a');
var i;
var popovers = document.querySelectorAll('a');

for (; target && target !== document; target = target.parentNode) {
for (i = popovers.length; i--;) {
if (popovers[i] === target) {
Expand Down Expand Up @@ -523,7 +527,9 @@
};

var findTarget = function (target) {
var i, toggles = document.querySelectorAll('a');
var i;
var toggles = document.querySelectorAll('a');

for (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) {
if (toggles[i] === target) {
Expand Down Expand Up @@ -618,7 +624,9 @@
'use strict';

var getTarget = function (target) {
var i, segmentedControls = document.querySelectorAll('.segmented-control .control-item');
var i;
var segmentedControls = document.querySelectorAll('.segmented-control .control-item');

for (; target && target !== document; target = target.parentNode) {
for (i = segmentedControls.length; i--;) {
if (segmentedControls[i] === target) {
Expand Down Expand Up @@ -695,7 +703,9 @@
var scrollableArea;

var getSlider = function (target) {
var i, sliders = document.querySelectorAll('.slider > .slide-group');
var i;
var sliders = document.querySelectorAll('.slider > .slide-group');

for (; target && target !== document; target = target.parentNode) {
for (i = sliders.length; i--;) {
if (sliders[i] === target) {
Expand Down Expand Up @@ -816,7 +826,9 @@
var toggle = false;

var findToggle = function (target) {
var i, toggles = document.querySelectorAll('.toggle');
var i;
var toggles = document.querySelectorAll('.toggle');

for (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) {
if (toggles[i] === target) {
Expand Down
1 change: 1 addition & 0 deletions js/.jscsrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"disallowLeftStickedOperators": ["?", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineStrings": true,
"disallowMultipleVarDecl": true,
"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
Expand Down
4 changes: 3 additions & 1 deletion js/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
'use strict';

var findModals = function (target) {
var i, modals = document.querySelectorAll('a');
var i;
var modals = document.querySelectorAll('a');

for (; target && target !== document; target = target.parentNode) {
for (i = modals.length; i--;) {
if (modals[i] === target) {
Expand Down
4 changes: 3 additions & 1 deletion js/popovers.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
var popover;

var findPopovers = function (target) {
var i, popovers = document.querySelectorAll('a');
var i;
var popovers = document.querySelectorAll('a');

for (; target && target !== document; target = target.parentNode) {
for (i = popovers.length; i--;) {
if (popovers[i] === target) {
Expand Down
4 changes: 3 additions & 1 deletion js/push.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,9 @@
};

var findTarget = function (target) {
var i, toggles = document.querySelectorAll('a');
var i;
var toggles = document.querySelectorAll('a');

for (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) {
if (toggles[i] === target) {
Expand Down
4 changes: 3 additions & 1 deletion js/segmented-controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
'use strict';

var getTarget = function (target) {
var i, segmentedControls = document.querySelectorAll('.segmented-control .control-item');
var i;
var segmentedControls = document.querySelectorAll('.segmented-control .control-item');

for (; target && target !== document; target = target.parentNode) {
for (i = segmentedControls.length; i--;) {
if (segmentedControls[i] === target) {
Expand Down
4 changes: 3 additions & 1 deletion js/sliders.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
var scrollableArea;

var getSlider = function (target) {
var i, sliders = document.querySelectorAll('.slider > .slide-group');
var i;
var sliders = document.querySelectorAll('.slider > .slide-group');

for (; target && target !== document; target = target.parentNode) {
for (i = sliders.length; i--;) {
if (sliders[i] === target) {
Expand Down
4 changes: 3 additions & 1 deletion js/toggles.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
var toggle = false;

var findToggle = function (target) {
var i, toggles = document.querySelectorAll('.toggle');
var i;
var toggles = document.querySelectorAll('.toggle');

for (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) {
if (toggles[i] === target) {
Expand Down