Skip to content

Commit

Permalink
fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti committed Feb 28, 2016
1 parent 32d1949 commit e3b5563
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/templates/bootstrap/datepicker.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {

This comment has been minimized.

Copy link
@alvaromb

alvaromb Feb 28, 2016

Collaborator

Sorry for the double quotes, I thought you were using it instead of single quotes 😄

datePickerMode = locals.mode;
}

Expand All @@ -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;

This comment has been minimized.

Copy link
@alvaromb

alvaromb Feb 28, 2016

Collaborator

I tend to forget about semicolons because we use syntactic sugar internally and never put a semicolon unless completely necessary. How about a small code style guide for contributing? Sorry for the 🍝 😝

This comment has been minimized.

Copy link
@gcanti

gcanti Feb 28, 2016

Author Owner

Nevermind! I added "test": "npm run lint && babel-node test" to package.json so we won't forget it next time ;)

Thanks again for your work on this release.

Buena tarde,
Giulio

}
}

Expand All @@ -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) {
Expand All @@ -59,7 +59,7 @@ function datepicker(locals) {
newTime.setMinutes(time.minute);
locals.onChange(newTime);
}
})
});
} else {
DatePickerAndroid.open({date: new Date()})
.then(function (date) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit e3b5563

Please sign in to comment.