mirror of
https://github.com/oceanprotocol/webtasks
synced 2025-02-14 21:10:37 +01:00
Merge pull request #6 from oceanprotocol/feature/linting
switch to eslint-config-oceanprotocol
This commit is contained in:
commit
8bd236bbc6
@ -1,6 +1,3 @@
|
||||
{
|
||||
"extends": "ascribe",
|
||||
"rules": {
|
||||
"func-names": 0
|
||||
}
|
||||
"extends": "oceanprotocol"
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||

|
||||
|
||||
[](https://travis-ci.com/oceanprotocol/webtasks)
|
||||
[](https://github.com/ascribe/javascript)
|
||||
[](https://github.com/oceanprotocol/eslint-config-oceanprotocol)
|
||||
|
||||
## Table of Contents
|
||||
|
||||
|
13
package.json
13
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"
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ app.get('/:username', (req, res) => {
|
||||
|
||||
request(url, (error, response) => {
|
||||
const json = JSON.parse(response.body.replace('])}while(1);</x>', ''))
|
||||
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);</x>', ''))
|
||||
const posts = json.payload.posts // eslint-disable-line prefer-destructuring
|
||||
const posts = json.payload.posts
|
||||
|
||||
if (error) {
|
||||
return
|
||||
|
@ -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 = {}
|
||||
|
@ -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(`<h3>Please pass your data in the following format</h3>
|
||||
- <code>/crm/{First Name:First Name, Last Name:Last Name,Contact Email:info@oceanprotocol.com}</code>`) // eslint-disable-line max-len
|
||||
- <code>/crm/{First Name:First Name, Last Name:Last Name,Contact Email:info@oceanprotocol.com}</code>`)
|
||||
})
|
||||
|
||||
server.get('/crm/:data', (req, res) => {
|
||||
|
Loading…
Reference in New Issue
Block a user