(function(Vue){
"use strict";

new Vue({
	el: 'body',
	
	data: {
		tasks: [],
		newTask: {}
	},

	created: function() {
		this.$http.get('/tasks').then(function(res) {
			this.tasks = res.data.items ? res.data.items : [];
		});
	},


	methods: {
		createTask: function() {
			if (!$.trim(this.newTask.name)) {
				this.newTask = {};
				return;
			};

			this.newTask.done = "false";

			this.$http.post('/task', this.newTask).success(function(res) {
				this.newTask.id = res.created;
				this.tasks.push(this.newTask);

				this.newTask = {};
			}).error(function(err) { console.log(err) });
		},


		deleteTask: function(index) {
			this.$http.delete('/task/' + index).success(function(res) {
				this.$http.get('/tasks').then(function(res) {
					this.tasks = res.data.items ? res.data.items : [];
				});
			}).error(function(err) { console.log(err) });
		},


		updateTask: function(task, completed) {
			if (completed) { task.done = "true" };

			this.$http.put('/task', task).success(function(res) {
				this.$http.get('/tasks').then(function(res) {
					this.tasks = res.data.items ? res.data.items : [];
				});
			}).error(function(err) { console.log(err) });
		}
	}
})


})(Vue);
@@ -47,17 +47,16 @@
 'body',%0A
-%09
 %0A%09data: 
@@ -573,32 +573,33 @@
 console.log(err)
+;
  %7D);%0A%09%09%7D,%0A%0A%0A%09%09de
@@ -839,32 +839,33 @@
 console.log(err)
+;
  %7D);%0A%09%09%7D,%0A%0A%0A%09%09up
@@ -944,11 +944,11 @@
 rue%22
+;
  %7D
-;
 %0A%0A%09%09
@@ -1160,16 +1160,17 @@
 log(err)
+;
  %7D);%0A%09%09%7D
@@ -1175,16 +1175,17 @@
 %09%7D%0A%09%7D%0A%7D)
+;
 %0A%0A%0A%7D)(Vu
@@ -1187,8 +1187,9 @@
 %7D)(Vue);
+%0A

Fix eslint errors