Skip to content

Commit

Permalink
Fix misparsing rules when --rules is used several times and with commas
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmengels committed Mar 6, 2021
1 parent d68d6e5 commit 27258e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ path.relative(process.cwd(), 'elm.json')
}

if (Array.isArray(args.rules)) {
return args.rules;
return args.rules.reduce(
(acc, rules) => [...acc, ...rules.split(',')],
[]
);
}

return null;
Expand Down

0 comments on commit 27258e1

Please sign in to comment.