You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 6, 2022. It is now read-only.
This is useful for many reasons, specially the code style and formatting. There's no need to strictly adhere to a standard, since a lot of things may be context-dependent, but explaining some context examples would be helpful for contributors and maintainers, because development performance can (and will) increase because there's less questions to ask and less pattern recognition to do (also the cognitive load of remembering the patterns is decreased)
I've seen:
Files indented with tabs, 2 spaces, and 4 spaces
Use of single and double quotes at the same line with no explanation of why they're inconsistent and no pattern to find
Some places have semicolons and other's don't. Although I found the pattern: they're only used when a line delimitation is ambiguous (this is good practice)
Some functions are one-liners and others get expanded to 3 lines, seemingly with no pattern or context
let and const used interchangeably, with a bias in favor of let. I like this because let is shorter, but it unnecessarily increases cognitive load when a variable is never assigned to, causing both humans and compilers to check if the variable is read-only or not
This causes confusion for people that want to contribute for the 1st or 2nd time to the repo (if they actually think or notice these details lol)
The file can also give other kinds of advice to increase the likelihood and speed of a PR being accepted