Skip to content

Commit 32b9e4c

Browse files
Merge pull request #573 from avsek477/remove-babel
Remove babel
2 parents 9cdf18c + d92bf07 commit 32b9e4c

7 files changed

Lines changed: 60 additions & 94 deletions

File tree

.babelrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 35 deletions
This file was deleted.

.npmignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
test
2+
docs
3+
coverage
4+
examples
5+
.github
6+
.nyc_output
7+
.travis.yml
8+
.istanbul.yml
9+
.jsdoc.json

examples/rest2/wallets.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,17 @@ module.exports = runExample({
7272
prepareAmount(balance),
7373
prepareAmount(balanceAvailable),
7474

75-
...(_isFinite(value) ? [
76-
prepareAmount(value),
77-
currency !== valueCCY
78-
? prepareAmount(lastPrices[symbolForWallet({ currency })])
79-
: 1
80-
] : [
81-
'-',
82-
'-'
83-
])
75+
...(_isFinite(value)
76+
? [
77+
prepareAmount(value),
78+
currency !== valueCCY
79+
? prepareAmount(lastPrices[symbolForWallet({ currency })])
80+
: 1
81+
]
82+
: [
83+
'-',
84+
'-'
85+
])
8486
]
8587
})
8688

examples/util/run_example.js

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -99,27 +99,33 @@ module.exports = (args = {}, example = () => { }) => {
9999
debug,
100100
debugTable,
101101

102-
...(!readline ? {} : {
103-
readline: Readline.createInterface({
104-
input: process.stdin,
105-
output: process.stdout,
106-
terminal: false
107-
})
108-
}),
109-
110-
...(!rest ? {} : {
111-
rest: new RESTv2({
112-
...(restEnv ? argsFromEnv('REST_URL') : {}),
113-
...restArgs
114-
})
115-
}),
116-
117-
...(!ws ? {} : {
118-
ws: new WSv2({
119-
...(wsEnv ? argsFromEnv('WS_URL') : {}),
120-
...wsArgs
121-
})
122-
})
102+
...(!readline
103+
? {}
104+
: {
105+
readline: Readline.createInterface({
106+
input: process.stdin,
107+
output: process.stdout,
108+
terminal: false
109+
})
110+
}),
111+
112+
...(!rest
113+
? {}
114+
: {
115+
rest: new RESTv2({
116+
...(restEnv ? argsFromEnv('REST_URL') : {}),
117+
...restArgs
118+
})
119+
}),
120+
121+
...(!ws
122+
? {}
123+
: {
124+
ws: new WSv2({
125+
...(wsEnv ? argsFromEnv('WS_URL') : {}),
126+
...wsArgs
127+
})
128+
})
123129
}
124130
} catch (e) {
125131
debug('error loading config: %s', e.message)

lib/transports/ws2.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,8 @@ class WSv2 extends EventEmitter {
473473
return authSeq !== this._lastAuthSeq
474474
? new Error(
475475
`invalid auth seq #, expected no advancement but got ${authSeq}`
476-
) : null
476+
)
477+
: null
477478
}
478479

479480
if (authSeq === this._lastAuthSeq) {

package.json

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
}
1313
},
1414
"scripts": {
15-
"lint": "eslint lib/ examples/ test/ index.js",
15+
"lint": "standard",
1616
"test": "npm run lint && npm run unit",
1717
"unit": "NODE_ENV=test mocha -b --recursive",
18-
"docs": "rm -rf docs && node_modules/.bin/jsdoc --configure .jsdoc.json --verbose",
19-
"build": "babel -q ./index.js -d ./dist && babel -q ./lib -d ./dist/lib && copy package.json dist"
18+
"docs": "rm -rf docs && node_modules/.bin/jsdoc --configure .jsdoc.json --verbose"
2019
},
2120
"repository": {
2221
"type": "git",
@@ -42,40 +41,28 @@
4241
},
4342
"homepage": "http://bitfinexcom.github.io/bitfinex-api-node/",
4443
"devDependencies": {
45-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
46-
"babel-plugin-transform-regenerator": "^6.26.0",
47-
"babel-preset-env": "^1.7.0",
4844
"bfx-api-mock-srv": "^1.0.4",
4945
"chai": "^4.2.0",
5046
"docdash": "^1.2.0",
5147
"dotenv": "^8.2.0",
52-
"eslint": "^6.8.0",
53-
"eslint-config-standard": "^14.1.0",
54-
"eslint-plugin-import": "^2.20.1",
55-
"eslint-plugin-jsdoc": "^22.0.0",
56-
"eslint-plugin-lodash": "^6.0.0",
57-
"eslint-plugin-node": "^11.0.0",
58-
"eslint-plugin-promise": "^4.2.1",
59-
"eslint-plugin-standard": "^4.0.1",
6048
"husky": "^4.2.3",
6149
"jsdoc-to-markdown": "^5.0.1",
6250
"mocha": "^7.1.0",
6351
"socks-proxy-agent": "^5.0.0",
64-
"standard": "^14.3.1"
52+
"standard": "^16.0.3"
6553
},
6654
"dependencies": {
6755
"readline-promise": "^1.0.4",
6856
"blessed": "^0.1.81",
6957
"blessed-contrib": "^4.8.19",
7058
"cli-table3": "^0.6.0",
71-
"bfx-api-node-models": "^1.3.1",
72-
"bfx-api-node-rest": "^4.0.0",
73-
"bfx-api-node-util": "^1.0.2",
59+
"bfx-api-node-models": "^1.4.0",
60+
"bfx-api-node-rest": "^4.1.2",
61+
"bfx-api-node-util": "^1.0.10",
7462
"bfx-api-node-ws1": "^1.0.0",
7563
"bignumber.js": "^9.0.0",
7664
"bluebird": "^3.5.1",
7765
"cbq": "0.0.1",
78-
"copy": "^0.3.2",
7966
"crc-32": "^1.2.0",
8067
"debug": "^4.1.1",
8168
"lodash": "^4.17.4",
@@ -86,5 +73,10 @@
8673
"request": "^2.67.0",
8774
"request-promise": "^4.2.0",
8875
"ws": "^7.2.1"
76+
},
77+
"standard": {
78+
"ignore": [
79+
"/docs/**/*.js"
80+
]
8981
}
9082
}

0 commit comments

Comments
 (0)