Skip to content

Commit

Permalink
minor eslint fixes for scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Sep 15, 2015
1 parent 7c655a4 commit ce4fc75
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
insert_final_newline = true
6 changes: 3 additions & 3 deletions lib/scripts/createSelectorScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import findStrategy from './findElementStrategy'
* @param {Function} callback
* @returns {string}
*/
let createSelectorScript = function(fn, selectors, args) {
let createSelectorScript = function (fn, selectors, args) {
let strArgs = []
let foundSel = []

Expand Down Expand Up @@ -61,7 +61,7 @@ let createSelectorScript = function(fn, selectors, args) {
* console.log(one, two, three); // 1 2 3
* }
*/
var executeClientSide = function(fn, sArr, args) {
var executeClientSide = function (fn, sArr, args) {
var cb = arguments[arguments.length - 1],
i = 0, sArgs = [],
use, value, xp, cs, tn,
Expand Down Expand Up @@ -140,4 +140,4 @@ var executeClientSide = function(fn, sArr, args) {
return fn.apply(window, parameter);
};

export default createSelectorScript
export default createSelectorScript
4 changes: 2 additions & 2 deletions lib/scripts/getHTML.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @return {String} html source
*/

let getHTML = function(elements, includeSelectorTag) {
let getHTML = function (elements, includeSelectorTag) {
var ret = [];

if (elements.length === 0) {
Expand All @@ -20,4 +20,4 @@ let getHTML = function(elements, includeSelectorTag) {
return ret;
}

export default getHTML
export default getHTML
4 changes: 2 additions & 2 deletions lib/scripts/getViewportSize.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
* helper function to get the viewport size of the browser
*/

let getViewportSize = function() {
let getViewportSize = function () {
return {
screenWidth: Math.max(document.documentElement.clientWidth, window.innerWidth || 0),
screenHeight: Math.max(document.documentElement.clientHeight, window.innerHeight || 0)
};
}

export default getViewportSize
export default getViewportSize
4 changes: 2 additions & 2 deletions lib/scripts/isWithinViewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @see waitForVisible
*/

let isWithinViewport = function(elements) {
let isWithinViewport = function (elements) {
var db = document.body,
dde = document.documentElement,
result = [];
Expand Down Expand Up @@ -45,4 +45,4 @@ let isWithinViewport = function(elements) {
return result;
}

export default isWithinViewport
export default isWithinViewport
6 changes: 3 additions & 3 deletions lib/scripts/newWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/

/* global window */
let newWindow = function(url, windowName, windowFeatures) {
window.open(url, windowName, windowFeatures);
let newWindow = function (url, windowName, windowFeatures) {
window.open(url, windowName, windowFeatures)
}

export default newWindow
export default newWindow
6 changes: 3 additions & 3 deletions lib/scripts/scroll.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* global window */
let scroll = function(x,y) {
return window.scrollTo(x,y);
let scroll = function (x, y) {
return window.scrollTo(x, y)
}

export default scroll
export default scroll

0 comments on commit ce4fc75

Please sign in to comment.