New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fork of brace-style rule to support one line arrow functions #32
Conversation
3 similar comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just did a quick glance. I'll leave it to @yokuze to do the more thorough review.
/** | ||
* @fileoverview Rule to flag block statements that do not use the one true brace style | ||
* @author Ian Christian Myers | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your comment and commit message says the name of the option is allowSingleLineArrowFunctions
but the code has allowSingleLineArrow
. I think allowSingleLineArrowFunctions
is clearer.
Everything else looks good.
Actually, I changed it to |
The base brace-style rule in eslint does not have an option to support one line arrow functions like: ``` myFunction((b) => { doSomething(b); }); ``` The only option available is `allowSingleLine`, which would allow the above code to pass, but would also allow one line if statements. This commit forks the brace-style rule and adds the option `allowSingleLineArrow`.
696a63a
to
c631354
Compare
Looks fine. |
The base brace-style rule in eslint does not have an option to support
one line arrow functions like:
The only option available is
allowSingleLine
, which would allow theabove code to pass, but would also allow one line if statements.
This commit forks the brace-style rule and adds the option
allowSingleLineArrowFunctions
.