Last active
August 29, 2015 14:10
-
-
Save jwarby/ee6ccfd8fba6eb05941f to your computer and use it in GitHub Desktop.
Personal .jshintrc style guide file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
/* jwarby's JavaScript Style Guide | |
* v1.1.0 | |
* | |
* https://gist.github.com/75aeeab0793a60d14303 | |
* ===================================================== | |
*/ | |
/* | |
* ENVIRONMENTS | |
* ================= | |
*/ | |
// Define globals exposed by modern browsers. | |
"browser": true, | |
// Define globals exposed by jQuery. | |
"jquery": true, | |
// Define globals exposed by node | |
"node": true, | |
/* | |
* ENFORCING OPTIONS | |
* ================= | |
*/ | |
// Enforce wrapping of IIFE in brackets | |
"immed": true, | |
// Prohibit empty blocks of code | |
"noempty": true, | |
// Prohibit use of == and != in favor of === and !==. | |
"eqeqeq": true, | |
// Enforce tab width of 2 spaces. | |
"indent": 2, | |
// Prohibit use of a variable before it is defined. | |
"latedef": true, | |
// Enforce line length to 100 characters | |
"maxlen": 100, | |
// Require capitalized names for constructor functions. | |
"newcap": true, | |
// Enforce use of single quotation marks for strings. | |
"quotmark": "single", | |
// Enforce placing 'use strict' at the top function scope | |
"strict": true, | |
// Prohibit use of explicitly undeclared variables. | |
"undef": true, | |
// Warn when variables are defined but never used (but not when function | |
// arguments are not used). | |
"unused": "vars", | |
// Enforce use of curly brackets with blocks | |
"curly": true, | |
// Prohibit native prototype extensions | |
"freeze": true, | |
/* | |
* RELAXING OPTIONS | |
* ================= | |
*/ | |
// Suppress warnings about == null comparisons. | |
"eqnull": true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment