-
Notifications
You must be signed in to change notification settings - Fork 15
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
Document our approach on going to Standard style #70
Comments
@LinusU - mind expanding this for a better context? is it actioned already, and a close-candidate? or if there is anything that needs to be documented, let me know! |
I think that the thing left to do is better explain what we are doing, and why we are doing it. The short explanation is that we're converting each line that we are modifying to Standard style, and the short why is that we are doing it to preserve As far as actionable things to do, I think that we need to elaborate on this, and then write it down somewhere |
Unrelated to documentation, but a tool similar to https://github.com/grvcoelho/lint-diff could be useful to automate applying standardjs formatting only to lines which are changed. Similar to but different than the commonly employed https://github.com/okonet/lint-staged which lints an entire file once staged by git add. Or this one, Edit: Turns out this is not an easily solved problem 🤦♂. If anyone wants to help out on this point, please do. Precise-commits seems the most popular, but it uses prettier under the hood. Prettier has some bugs in its range based formatting which can mess up indenting. |
We are currently converting the code base into Standard style by converting each line that we touch when making changes. This approach is very nice since it doesn't introduce any additional conflicts and makes backporting work well.
However, I've never seen this actually documented somewhere. It would be nice if we could write down what we are doing, and why we are doing it. Maybe in the contributor guide.
We're following the same approach in node-canvas and I would love to be able to link to the description from there 😄
The text was updated successfully, but these errors were encountered: