feat(indent): ecma - support common use-cases

This commit is contained in:
Munif Tanjim 2022-01-21 18:44:30 +06:00 committed by Christian Clason
parent 782e299cd6
commit 7a6d93ca5b
8 changed files with 149 additions and 20 deletions

37
tests/indent/ecma/func.js Normal file
View file

@ -0,0 +1,37 @@
const arrow_func = (
a,
b,
c
) => {
log(a, b, c)
}
const arrow_func_without_brace = (a, b, c) =>
log(
a,
b,
c
)
function func_def(
a,
b,
{ c = '' }
) {
log(a, b, c)
}
func_call(
a,
(b) => b
)
chained_func_call()
.map()
.filter()
func_call(
chained_func_call()
.map()
.filter()
)