Space after function keyword - MOVED to #3847!
Problem
I apologize in advance if this has been discussed before (I did a quick search and didn't find it). One of the things that popped out when running prettier over our codebase was spacing on anonymous functions. For example, prettier converts this: [code block] into this: [code block] While this pattern is becoming less common for us (we'd probably use an arrow function here now), we still have several cases of this. The lack of space after the function keyword just doesn't read right for me. It probably has to do with one or more of the following: 1. It looks more like a function invocation than a declaration. 2. The lack of space after a keyword is odd. For prior art: - https://github.com/airbnb/javascript#functions--signature-spacing - http://eslint.org/docs/rules/space-before-function-paren - http://eslint.org/docs/rules/space-after-keywords Are there strong feelings on this one?
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Space after function keyword - MOVED to #3847!
Many people are using standard with prettier i think this should be an option with prettier.
Trust Score
7 verifications
- 1
Many people are using standard with prettier i think this should be an option wi
Many people are using standard with prettier i think this should be an option with prettier.
Validation
Resolved in prettier/prettier GitHub issue #1139. Community reactions: 31 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep