elm-community / elm-webgl

Moved to elm-explorations/webgl
http://package.elm-lang.org/packages/elm-explorations/webgl/latest
BSD 3-Clause "New" or "Revised" License
95 stars 22 forks source link

Unify code formatting in the Native module #18

Closed w0rm closed 8 years ago

w0rm commented 8 years ago

I'm not sure if there is a preferred way to format JavaScript, I am happy with any coding style but it has to be consistent.

Perhaps we can as well add an eslint config or something.

nphollon commented 8 years ago

I think this is a fine idea. Most of the original JS was written by @johnpmayer... maybe he has a suggested style?

The style I use personally is the strictest settings for JSHint, but it looks like the tool has changed a bit since the last time I used it.

w0rm commented 8 years ago

I added an eslint config for the most recent version of eslint. The cool thing about it, is that you can run eslint src/Native --fix and it will fix the formatting itself.

It also discovered a bug in throw error('No info available for: ' + attribute.type); where error should be new Error