From f50ab787d0cfa71d65af960c5c71aa4dd07b41c5 Mon Sep 17 00:00:00 2001 From: vvo Date: Sun, 5 Jan 2014 16:10:37 +0100 Subject: [PATCH] add editorconfig, fix whitespace --- .editorconfig | 15 +++++++++++++++ lib/commands/click.js | 1 - lib/commands/leftClick.js | 22 +++++++++++----------- lib/commands/rightClick.js | 22 +++++++++++----------- lib/protocol/buttonPress.js | 22 +++++++++++----------- 5 files changed, 48 insertions(+), 34 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000..fb4a4bdbc61 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] + +indent_style = space +indent_size = 4 + +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = false \ No newline at end of file diff --git a/lib/commands/click.js b/lib/commands/click.js index ca1e97ced52..e83a1286e39 100644 --- a/lib/commands/click.js +++ b/lib/commands/click.js @@ -1,7 +1,6 @@ var clickHelper = require('../helpers/click'); module.exports = function click (cssSelector, callback) { - var self = this; this.element(cssSelector, function(err,result) { diff --git a/lib/commands/leftClick.js b/lib/commands/leftClick.js index fe0c0786f37..557fa35503a 100755 --- a/lib/commands/leftClick.js +++ b/lib/commands/leftClick.js @@ -1,12 +1,12 @@ -var handleMouseButtonCommand = require('../helpers/handleMouseButtonCommand'); - -module.exports = function leftClick (cssSelector, callback) { - - handleMouseButtonCommand.call( - this, - cssSelector, - 'left', - callback - ); - +var handleMouseButtonCommand = require('../helpers/handleMouseButtonCommand'); + +module.exports = function leftClick (cssSelector, callback) { + + handleMouseButtonCommand.call( + this, + cssSelector, + 'left', + callback + ); + }; \ No newline at end of file diff --git a/lib/commands/rightClick.js b/lib/commands/rightClick.js index 4f93a54d3c5..94c27ff20a8 100755 --- a/lib/commands/rightClick.js +++ b/lib/commands/rightClick.js @@ -1,12 +1,12 @@ -var handleMouseButtonCommand = require('../helpers/handleMouseButtonCommand'); - -module.exports = function rightClick (cssSelector, callback) { - - handleMouseButtonCommand.call( - this, - cssSelector, - 'right', - callback - ); - +var handleMouseButtonCommand = require('../helpers/handleMouseButtonCommand'); + +module.exports = function rightClick (cssSelector, callback) { + + handleMouseButtonCommand.call( + this, + cssSelector, + 'right', + callback + ); + }; \ No newline at end of file diff --git a/lib/protocol/buttonPress.js b/lib/protocol/buttonPress.js index 07aa36d7bdd..3c932bd2347 100755 --- a/lib/protocol/buttonPress.js +++ b/lib/protocol/buttonPress.js @@ -1,11 +1,11 @@ -var handleMouseButtonProtocol = require('../helpers/handleMouseButtonProtocol'); - -module.exports = function buttonPress (button, callback) { - - handleMouseButtonProtocol.call( - this, - "/session/:sessionId/click", - button, callback - ); - -}; +var handleMouseButtonProtocol = require('../helpers/handleMouseButtonProtocol'); + +module.exports = function buttonPress (button, callback) { + + handleMouseButtonProtocol.call( + this, + "/session/:sessionId/click", + button, callback + ); + +};