I wrote a gist describing a little of mrdoob’s code conventions (as some have referred to the MDCS) and included a jscs rules for code style enforcing. https://gist.github.com/zz85/e929503387cdc597b4f7
Not everyone is familiar or used to MDCS so @WestLangley asked if there’s a script which can “mrdoobify” the rest of our codebase which has not conformed to that standard.
So some objectives I hope to archive are:
- Have some documentation on mrdoob’s code style (perhaps on the wiki pages?)
- Add jscs rules so contributors can use it for validating code via pre-commit hook or editor’s linting (sublime / vim) or just part of the build tools.
- Try some code transformation tools to make existing code more mrdoob style compliant.
For 2, there are a couple more features in the JSCS I’m waiting to get implemented or merged before it could really enforce MDCS. In particular, jscs-dev/node-jscs#371 jscs-dev/node-jscs#333 possibly jscs-dev/node-jscs#244 and jscs-dev/node-jscs#126 (comment) too.
As for 3, I could try out codepainter (https://github.com/jedmao/codepainter) and see how well it works for this.