Skip to content

Commit bf541d1

Browse files
committed
fix some lint issues
1 parent 36cdf46 commit bf541d1

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

.eslintrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"env": {
3+
"node": true
4+
},
5+
"extends": "eslint:recommended"
6+
}

src/compile-fun.ls

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
require! {vm, path: Path, fs}
2-
require! <[ ./config ./get-user-config ]>
3-
require! ramda: {apply, is-nil, append, flip, type, replace, merge, map, join, for-each, split, head, pick-by, tap, pipe, concat, take, identity, is-empty, reverse, invoker, from-pairs, merge-all, path, reduce, obj-of, assoc-path, adjust, to-pairs}: R
2+
require! <[ ./get-user-config ]>
3+
require! ramda: {apply, map, join, split, tap, pipe, identity, reverse, from-pairs, path, reduce, assoc-path, adjust, to-pairs}: R
44
require! util: {inspect}
5+
require! camelize
6+
57
debug = require 'debug' <| 'ramda-cli:compile-fun'
68

79
# naive fix to get `match` work despite being a keyword in LS
@@ -81,7 +83,7 @@ compile-and-eval = (code, opts) ->
8183
|> tap -> debug "\n#it", 'compiled code'
8284
|> evaluate opts
8385

84-
compile-fun = (opts, die) ->
86+
compile-fun = (opts) ->
8587
fns = (if opts.transduce then reverse else identity) opts._
8688
piped-inline-functions = construct-pipe switch
8789
| opts.js => fns

src/stream.ls

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require! ramda: {apply, is-nil, append, flip, type, replace, merge, map, join, for-each, split, head, pick-by, tap, pipe, concat, take, identity, is-empty, reverse, invoker, from-pairs, merge-all, path, reduce, obj-of, assoc-path, adjust, to-pairs}: R
1+
require! ramda: {is-nil, append, flip, type, for-each, reduce}: R
22
require! stream: {PassThrough}
33
require! through2: through
44
require! {JSONStream, split2}
@@ -15,7 +15,7 @@ reduce-stream = (fn, acc) -> through.obj do
1515
this.push acc
1616
next!
1717

18-
concat-stream = -> reduce-stream flip(append), []
18+
export concat-stream = -> reduce-stream flip(append), []
1919

2020
unconcat-stream = -> through.obj (chunk,, next) ->
2121
switch type chunk
@@ -115,7 +115,7 @@ make-map-stream = (die, opts, fun) ->
115115
if opts.transduce then (require 'transduce-stream') fun, {+object-mode}
116116
else map-stream fun, -> die (take-lines 3, it.stack)
117117

118-
export get-stream-as-promise = (stream, cb) ->
118+
export get-stream-as-promise = (stream) ->
119119
new Promise (resolve, reject) ->
120120
res = null
121121
stream

0 commit comments

Comments
 (0)