dan1t0 / Rest_Wifi-Pi

Very simple (and alfa) API to manage RaspWifi-Pi
1 stars 1 forks source link

Styleguide #7

Open jesusprubio opened 9 years ago

jesusprubio commented 9 years ago

I've included a Grunt task to check it using https://github.com/jscs-dev/node-jscs. We need to implement our custom setup file (jscrc) or to choose one of the most used styleguides (https://github.com/jscs-dev/node-jscs/tree/master/presets), which we can also customize.

I've added a new JSCS config file: https://github.com/assaultjs/assaultjs-utils-network/blob/master/.jscsrc. It uses the Crockford's Styleguide preset. I have my personal preferences but I can live with the default choices. But If anybody notices something important for him we can customize the setup or choose another by default:

I've also added another task ("jshint") to check if the code respect our setup file. Which I write to be the more restrictive as posible. As you can see I like to control JS "powers" ;).

Since the last versions of both libraries they don't overlap checks. JSHint checks for programming errors and JSCS only for style related ones.

Finally we also have another task ("contribute") to run both. The README reflects it.

Once we decided this stuff we should change all .js files to respect them.

So, speak now guys ... :)