-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Space after function keyword in anonymous functions #3847
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)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Milestone
Description
NOTE: This issue is raised due to confusion in #1139.
This issue is only about anonymous functions:
const identity = function (value) {
// ^ space here
return value;
}(Prettier currently does not put a space there.)
🗒 NOTE: This issue is not about having a space after the function name:
function identity (value) { // ^ space here: SEE #3845! return value; }Space after function name is tracked in #3845!
The key argument is:
Consistency: This means that there's always a space after the function keyword.
Reactions are currently unavailable
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)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.