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
Fix: improve newline-per-chained-call
message (fixes #6340)
#6360
Conversation
LGTM |
}, { | ||
message: "Expected line break after `m1().m2\\n.m3().m4().m5().m6()`." | ||
message: "Expected line break before `.end`." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to add some test cases for computed properties.
LGTM |
f9bbd76
to
a035cf0
Compare
Thank you for the review! I updated this.
|
function getPropertyText(node) { | ||
var prefix = node.computed ? "[" : "."; | ||
var lines = sourceCode.getText(node.property).split(/\r\n|\r|\n/g); | ||
var surfix = node.computed && lines.length === 1 ? "]" : ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
surfix -> suffix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I updated it.
a035cf0
to
675e3c7
Compare
LGTM |
1 similar comment
LGTM |
fixes #6340.
Expected line break before 'PropertyName'.