-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MemberExpression] Long object access doesn't wrap #21
Comments
@JakeCoxon If you want to give it a shot you might be interested in the discussion in #212 and my take on this (which created a lot of other issues) in #217. I'd still like to see a solution for this. Chai assertions are another thing that suffer from this. I wonder if there is a way to only add an softspace after a dot if the currently printed line would exceed the max line length with the next token. But I think that's not easy at all and not performant. |
@despairblue do you mind giving a real-world example of chai assertions that do not look good? It's usually better for this kind of things to look at real code rather than make up examples. |
@despairblue thank you! This is great! Shouldn't be too hard to make work. |
With #462 it looks like if (testConfig.ENABLE_ONLINE_TESTS === "true") {
describe("POST /users/me/pet", function() {
it("saves pet", function() {
function assert(pet) {
expect(pet).to.have.property("OwnerAddress").that.deep.equals({
AddressLine1: "Alexanderstrasse",
AddressLine2: "",
PostalCode: "10999",
Region: "Berlin",
City: "Berlin",
Country: "DE"
});
}
});
});
} which is better. But we should also be able to break the |
There are currently three issues related to suboptimal rendering of MemberExpression chains. The previous implementation was trying to flatten only a single group at the same time, but it didn't work well because we didn't have the full context to be able to make decisions. In this implementation, I'm going through the entire chain at the same time and group it into logical units and make decisions based on this. It solves all the problems I can think of and if we need to tweak it in the future, it should be easy. Fixes prettier#268 Fixes prettier#212 Fixes prettier#21
There are currently three issues related to suboptimal rendering of MemberExpression chains. The previous implementation was trying to flatten only a single group at the same time, but it didn't work well because we didn't have the full context to be able to make decisions. In this implementation, I'm going through the entire chain at the same time and group it into logical units and make decisions based on this. It solves all the problems I can think of and if we need to tweak it in the future, it should be easy. Fixes prettier#268 Fixes prettier#212 Fixes prettier#21
There are currently three issues related to suboptimal rendering of MemberExpression chains. The previous implementation was trying to flatten only a single group at the same time, but it didn't work well because we didn't have the full context to be able to make decisions. In this implementation, I'm going through the entire chain at the same time and group it into logical units and make decisions based on this. It solves all the problems I can think of and if we need to tweak it in the future, it should be easy. Fixes prettier#268 Fixes prettier#212 Fixes prettier#21
There are currently three issues related to suboptimal rendering of MemberExpression chains. The previous implementation was trying to flatten only a single group at the same time, but it didn't work well because we didn't have the full context to be able to make decisions. In this implementation, I'm going through the entire chain at the same time and group it into logical units and make decisions based on this. It solves all the problems I can think of and if we need to tweak it in the future, it should be easy. Fixes prettier#268 Fixes prettier#212 Fixes prettier#21
There are currently three issues related to suboptimal rendering of MemberExpression chains. The previous implementation was trying to flatten only a single group at the same time, but it didn't work well because we didn't have the full context to be able to make decisions. In this implementation, I'm going through the entire chain at the same time and group it into logical units and make decisions based on this. It solves all the problems I can think of and if we need to tweak it in the future, it should be easy. Fixes prettier#268 Fixes prettier#212 Fixes prettier#21
There are currently three issues related to suboptimal rendering of MemberExpression chains. The previous implementation was trying to flatten only a single group at the same time, but it didn't work well because we didn't have the full context to be able to make decisions. In this implementation, I'm going through the entire chain at the same time and group it into logical units and make decisions based on this. It solves all the problems I can think of and if we need to tweak it in the future, it should be easy. Fixes #268 Fixes #212 Fixes #21
Not sure if this is a bug or just a rare enough case that it doesn't matter
Input
Output
(Longer than 60 chars)
Input
Output
The text was updated successfully, but these errors were encountered: