dprint-plugin-typescript
dprint-plugin-typescript copied to clipboard
Add "anonymous-only" value to "functionExpression.spaceBeforeParentheses" configuration
Currently functionExpression.spaceBeforeParentheses is a boolean configuration option. It would be great if this could be extended to allow further choice on treating anonymous function expressions differently to named function expressions.
Input Code
const namedFunctionExpression = function namedFunctionExpression() {
return true;
};
const anonymousFunctionExpression = function() {
return true;
};
Desired Output
const namedFunctionExpression = function namedFunctionExpression() {
return true;
};
const anonymousFunctionExpression = function () {
return true;
};
You can already do this via "functionExpression.spaceAfterFunctionKeyword": true: Playground