-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Empty line not preserved before leading ; with no-semi #1510
Copy link
Copy link
Labels
area:idempotencyIssues with re-printing Prettier’s outputIssues with re-printing Prettier’s outputarea:no-semidifficulty:hardIssues that might take an entire weekend, or require a tough decision to fixIssues that might take an entire weekend, or require a tough decision to fixlang:javascriptIssues affecting JSIssues affecting JS
Metadata
Metadata
Assignees
Labels
area:idempotencyIssues with re-printing Prettier’s outputIssues with re-printing Prettier’s outputarea:no-semidifficulty:hardIssues that might take an entire weekend, or require a tough decision to fixIssues that might take an entire weekend, or require a tough decision to fixlang:javascriptIssues affecting JSIssues affecting JS
There seem to be cases in which a single prettier run is not sufficient. A second run will change the already formatted file again. After the second run no more formatting will happen.
Prettier 1.10.2
Playground link
Input:
Output:
Second Output:
Note the removed line.
I assumed 🤔 that prettier formatting is idempotent. Am I wrong 🙇 or is this a bug?
The only important option seems to be
semi: false.