mirror of
https://github.com/oceanprotocol/webtasks
synced 2025-01-04 19:05:17 +01:00
switch to eslint-config-oceanprotocol
This commit is contained in:
parent
127ad00d60
commit
f42e0bdeb5
@ -1,6 +1,3 @@
|
||||
{
|
||||
"extends": "ascribe",
|
||||
"rules": {
|
||||
"func-names": 0
|
||||
}
|
||||
"extends": "oceanprotocol"
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
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