Commit f52dd622 authored by wim-vantomme's avatar wim-vantomme

Added standard js linter.

parent cacf46e8
{
"env": {
"es6": true,
"node": true,
"mocha": true
},
"parserOptions": {
"ecmaVersion": 2017
},
"extends": "eslint:recommended",
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
}
This diff is collapsed.
......@@ -41,9 +41,9 @@
"winston": "^2.4.0"
},
"devDependencies": {
"eslint": "^4.17.0",
"mocha": "^5.0.0",
"request": "^2.83.0",
"request-promise": "^4.2.2"
"request-promise": "^4.2.2",
"standard": "^10.0.3"
}
}
/* eslint-disable no-unused-vars */
const axios = require('axios')
class Service {
constructor (options) {
this.options = options || {};
this.options = options || {}
}
async find (params) {
return [];
return []
}
async get (id, params) {
return {
id, text: `A new message with ID: ${id}!`
};
}
}
async create (data, params) {
......@@ -25,25 +24,24 @@ class Service {
})
}, data.delay)
return data;
return data
}
async update (id, data, params) {
return data;
return data
}
async patch (id, data, params) {
return data;
return data
}
async remove (id, params) {
return { id };
return { id }
}
}
module.exports = function (options) {
return new Service(options);
};
return new Service(options)
}
module.exports.Service = Service;
module.exports.Service = Service
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment