-
Notifications
You must be signed in to change notification settings - Fork 341
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
Remove Restyle in CML or adjust it to follow airbnb style #596
Comments
Existential doubt from #581 (comment), #608 (comment) and #648 (comment) about what is the best approach for accessing optional nested values: Perlification1(item) => {
const { property: { data = '' } = {} } = item;
return data.endsWith('text');
} Abracadabra(item) =>
item &&
item.property &&
item.property.data &&
item.property.data.endsWith('text'); Chaining2(item) => item?.property?.data?.endsWith('text') 1 Works for empty objects, but not for nullish values |
Note: as per #581 (comment), we probably should broaden a bit the scope of the issue title. |
* Fix minor typo in cml-send-comment.js * Add GitHub support for cml-send-comment --update * Add BitBucket support for cml-send comment --update * Increase end to end test timeouts * Emit a warning when Pull Request Commit Links is not installed * Alias console.log to print after monkey-patching * Rename fullEndpoint to url * Use more destructuring on bitbucket_cloud.js * Use destructuring on github.js * Add GitLab error for comment updates * Use destructuring as a workaround to optional chaining (#596) * Require the Pull Request Commit Links API to work * BB comment spacing
Another style topic: #583 (comment) |
Speaking about what linters can't detect: how deffensive should we be when writing code that interacts with complex systems we can't control? |
Already using optional chaining 🎉 |
Tracking #1026 (comment) |
Having some clear difficulties in having consistency in style, its better to just let the linter speak and refuse the PR if the style does not match the chosen style.
We have to:
This will make contributions harder but at least the base source code will follow the same convention.
The text was updated successfully, but these errors were encountered: