From e3b55636b6d2e9e374c8deb96256fb64837e3c86 Mon Sep 17 00:00:00 2001 From: gcanti Date: Sun, 28 Feb 2016 14:30:45 +0100 Subject: [PATCH] fix eslint errors --- lib/templates/bootstrap/datepicker.android.js | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/templates/bootstrap/datepicker.android.js b/lib/templates/bootstrap/datepicker.android.js index ee17853c..db66d853 100644 --- a/lib/templates/bootstrap/datepicker.android.js +++ b/lib/templates/bootstrap/datepicker.android.js @@ -18,8 +18,8 @@ function datepicker(locals) { } // Setup the picker mode - var datePickerMode = "date"; - if (locals.mode === "date" || locals.mode === "time") { + var datePickerMode = 'date'; + if (locals.mode === 'date' || locals.mode === 'time') { datePickerMode = locals.mode; } @@ -29,13 +29,13 @@ function datepicker(locals) { * ``locals.config.format``: Date format function */ var formattedValue = String(locals.value); - var background = TouchableNativeFeedback.SelectableBackground() + var background = TouchableNativeFeedback.SelectableBackground(); // eslint-disable-line new-cap if (locals.config) { if (locals.config.format) { formattedValue = locals.config.format(locals.value); } if (locals.config.background) { - background = locals.config.background + background = locals.config.background; } } @@ -50,7 +50,7 @@ function datepicker(locals) { ref="input" background={background} onPress={function () { - if (datePickerMode === "time") { + if (datePickerMode === 'time') { TimePickerAndroid.open({is24Hour: true}) .then(function (time) { if (time.action !== TimePickerAndroid.dismissedAction) { @@ -59,7 +59,7 @@ function datepicker(locals) { newTime.setMinutes(time.minute); locals.onChange(newTime); } - }) + }); } else { DatePickerAndroid.open({date: new Date()}) .then(function (date) { diff --git a/package.json b/package.json index e45197c3..26889bfa 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "lint": "eslint lib", - "test": "babel-node test" + "test": "npm run lint && babel-node test" }, "repository": { "type": "git",