diff --git a/.eslintrc b/.eslintrc index f713a59..c053478 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,6 +1,3 @@ { - "extends": "ascribe", - "rules": { - "func-names": 0 - } + "extends": "oceanprotocol" } diff --git a/README.md b/README.md index b0210d4..b0d83b6 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ![giphy](https://user-images.githubusercontent.com/90316/37671913-0eb2f70a-2c6d-11e8-809e-04d3b40ef1c9.gif) [![Build Status](https://travis-ci.com/oceanprotocol/webtasks.svg?token=3psqw6c8KMDqfdGQ2x6d&branch=master)](https://travis-ci.com/oceanprotocol/webtasks) -[![js ascribe](https://img.shields.io/badge/js-ascribe-39BA91.svg)](https://github.com/ascribe/javascript) +[![js oceanprotocol](https://img.shields.io/badge/js-oceanprotocol-7b1173.svg)](https://github.com/oceanprotocol/eslint-config-oceanprotocol) ## Table of Contents diff --git a/package.json b/package.json index 88e62b8..282fd67 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "start": "wt serve webtask-zoho.js", - "test": "eslint ./{src,public}/**/*.js" + "test": "eslint ./*.js" }, "dependencies": { "body-parser": "^1.18.3", @@ -14,9 +14,12 @@ "webtask-tools": "^3.2.1" }, "devDependencies": { - "babel-eslint": "^8.2.5", - "eslint": "^4.19.1", - "eslint-config-ascribe": "^3.0.5", - "eslint-plugin-import": "^2.13.0" + "eslint": "^5.0.1", + "eslint-config-oceanprotocol": "^1.0.4", + "eslint-config-standard": "^11.0.0", + "eslint-plugin-import": "^2.13.0", + "eslint-plugin-node": "^6.0.1", + "eslint-plugin-promise": "^3.8.0", + "eslint-plugin-standard": "^3.1.0" } } diff --git a/webtask-medium.js b/webtask-medium.js index 195d97c..614c9e5 100644 --- a/webtask-medium.js +++ b/webtask-medium.js @@ -15,7 +15,7 @@ app.get('/:username', (req, res) => { request(url, (error, response) => { const json = JSON.parse(response.body.replace('])}while(1);', '')) - const posts = json.payload.posts // eslint-disable-line prefer-destructuring + const posts = json.payload.posts const parsedPosts = [] let holder = {} @@ -44,7 +44,7 @@ app.get('/:username/raw', (req, res) => { request(url, (error, response) => { const json = JSON.parse(response.body.replace('])}while(1);', '')) - const posts = json.payload.posts // eslint-disable-line prefer-destructuring + const posts = json.payload.posts if (error) { return diff --git a/webtask-youtube.js b/webtask-youtube.js index b607444..294e517 100644 --- a/webtask-youtube.js +++ b/webtask-youtube.js @@ -18,7 +18,7 @@ app.get('/:playlist', (req, res) => { request(options, (error, response, body) => { const json = JSON.parse(body) - const videos = json.items // eslint-disable-line prefer-destructuring + const videos = json.items const parsedPosts = [] let holder = {} diff --git a/webtask-zoho.js b/webtask-zoho.js index ca5d502..3a04e2c 100644 --- a/webtask-zoho.js +++ b/webtask-zoho.js @@ -58,7 +58,7 @@ server.get('/newsletter/:data', (req, res) => { const { data } = req.params const options = { - url: `${apiUrlZohoCampaigns}json/listsubscribe?authtoken=${ZOHO_CAMPAIGNS_TOKEN}&scope=CampaignsAPI&resfmt=JSON&listkey=${ZOHO_CAMPAIGNS_LIST_KEY}&contactinfo=${decodeURIComponent(data)}` // eslint-disable-line max-len + url: `${apiUrlZohoCampaigns}json/listsubscribe?authtoken=${ZOHO_CAMPAIGNS_TOKEN}&scope=CampaignsAPI&resfmt=JSON&listkey=${ZOHO_CAMPAIGNS_LIST_KEY}&contactinfo=${decodeURIComponent(data)}` } sendRequest(options, res) }) @@ -69,7 +69,7 @@ server.get('/newsletter/:data', (req, res) => { // server.get('/crm', (req, res) => { res.send(`
/crm/{First Name:First Name, Last Name:Last Name,Contact Email:info@oceanprotocol.com}
`) // eslint-disable-line max-len
+ - /crm/{First Name:First Name, Last Name:Last Name,Contact Email:info@oceanprotocol.com}
`)
})
server.get('/crm/:data', (req, res) => {