Open jacksonrayhamilton opened 8 years ago
I would highly recommend using prettier (https://github.com/prettier/prettier) and not deviating from its defaults. Using prettier means not having to think about code formatting and not needing to have these discussions.
In both v0.2 and v0.3 I've noticed that the codebase is pretty lax in terms of formatting and conventions. (Tabs and spaces are interchanged for indentation,
this
is sometimes assigned to a variable and sometimes not,var
statements are sometimes on top and sometimes close to place of first use...) It'd be easier for contributors to structure their code if there were some more consistent models to reference. It'd also make editing and reviewing easier by reducing the likelihood of whitespace-oriented commits.It might be worth considering adding an Editorconfig and a JSCS configuration, and formatting all the code to align with them. That should be easy to do with JSCS's "autofix" feature. The best time to do that would be when all pending PRs are resolved, to avoid merge conflicts. It will only have to happen once, since JSCS should guarantee consistency afterwards (especially if you configure it as a pre-merge hook using something like Travis).