-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Space after function name in declarations #3845
Copy link
Copy link
Closed
Labels
lang:flowIssues affecting Flow-specific constructs (not general JS issues)Issues affecting Flow-specific constructs (not general JS issues)lang:javascriptIssues affecting JSIssues affecting JSlang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)status:wontfixThis will not be worked onThis will not be worked ontype:option requestIssues requesting a new option. We generally don’t accept these unless there is technical necessity.Issues requesting a new option. We generally don’t accept these unless there is technical necessity.
Metadata
Metadata
Assignees
Labels
lang:flowIssues affecting Flow-specific constructs (not general JS issues)Issues affecting Flow-specific constructs (not general JS issues)lang:javascriptIssues affecting JSIssues affecting JSlang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)status:wontfixThis will not be worked onThis will not be worked ontype:option requestIssues requesting a new option. We generally don’t accept these unless there is technical necessity.Issues requesting a new option. We generally don’t accept these unless there is technical necessity.
NOTE: This issue is raised due to confusion in #1139.
NOTE: Feel free to use the 👍 and 👎 buttons to indicate your preferences, but please refrain from commenting unless you’ve read every comment and made sure yours says something that has not been said before.
This issue is only about outputting these spaces:
(Prettier currently does not put spaces in those positions.)
The key arguments is:
Searchability: You can find any function or method declaration my searching for e.g.
method (oridentity <, or even justname[space](mostly).It also provides a clear and immediate difference between declaration and invocation.
(There are many existing comments in favour of this style, notably: #1139 (comment) and the majority of the discussion from #1139 (comment) onwards.)