Closed zoxon closed 6 years ago
Thank you for your opinion.
I agreed that it was hard to read when they were in the same line. Spare me sometime to find a solution for all.
IMHO. The first thing to do is to disable formatting wiht inline comments, like in eslint. https://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments This will solve a lot of problems in the future
Here's my solution:
If the original function call is written in a single line, for example mixin(arg1: val1, arg2, val2)
, then the formatted content will be in a single line mixin(arg1: val1, arg2, val2)
.
If the original function call has one or more arguments written in a different line, for example
mixin(arg1: val1,
arg2: val2)
then the formatted content will be distributed in different line
mixin(
arg1: val1,
arg2: val2
)
This out-of-the-box solution has been implemented in version version 2.10.0, which is available now. You don't have to config anything to get this work.
Personally, I don't like the way ESLint allow us to make an exception to some rules/files. I'd rather make a patch to fix a real issue.
Cheers!
Thank You for the quick feedback
Hello, thank you for the wonderful tool. I have a question about named mixin parameters.
Example: This code is
formatted to this
How can I disable formatting or better format more pretty (readable) like now?