Support generator-star-spacing rule
One of the rules that ESLint supports is the http://eslint.org/docs/rules/generator-star-spacing rule. I have not found a way to independently control this in WebStorm. It appears that the difficulty is that my team has chosen to use the following rules:
"generator-star-spacing": [2, { "before": false, "after": true }],
"space-before-function-paren": [2, "never"],
In the WebStorm preferences, I am working with the following option:
Preferences > Editor > Code Style > JavaScript > Spaces >
Before Parentheses > Function declaration parentheses.
If I set that option to true, then when I run the Reformat Code command my code looks like this:
function findFriends (next) { ... }
function* (req, res) { ... }
If I set the option to false, then my code looks like this:
function findFriends(next) { ... }
function*(req, res) { ... }
The desired state is this:
function findFriends(next) { ... }
function* (req, res) { ... }
If there is a way to support this, can you let me know? Otherwise I suppose this is a feature request to support the same level of granularity that ESLint supports.
Thanks
Please sign in to leave a comment.
There is no such feature in current version, https://youtrack.jetbrains.com/issue/WEB-20668 is fixed in 2017.2