MrDHat / generator-node-mocha

Create a Node.js module with yo, including Mocha unit tests.
MIT License
7 stars 7 forks source link

add comments to jshint rules #2

Closed thanpolas closed 10 years ago

thanpolas commented 10 years ago

This PR adds sensible comments to the .jshintrc file, retains every rule that previously existed and adds the following new rules:

  // Force all variable names to use either camelCase style
  // or UPPER_CASE with underscores.
  "camelcase": true,
  // Prohibit trailing whitespace.
  "trailing": true,

Additionally adds the following two opinionated rules, but under a clear banner to easily be configured. Opinions definitely diverge here but the rules have to be there for developers to change.

  // Enforce tab width of 2 spaces.
  "indent": 2,
  // Enforce use of single quotation marks for strings.
  "quotmark": "single",

Finally, two more rules were added related to not warn for the lack of "use strict". I understand if you do not wish this be included.

  // do not complain for lack of 'use strict';
  "globalstrict": false,
  "strict": false,
thanpolas commented 10 years ago

@MrDHat changes incorporated, ready.

MrDHat commented 10 years ago

This looks good now. Please squash the last three commits into one and I'll be happy to merge :smile:

thanpolas commented 10 years ago

I am sorry, i can't do that.

MrDHat commented 10 years ago

Erm.. I asked you to do that, so that only those commits appear which are necessary. Nevertheless, I understand. Merging now. Thank you for the patch!