Skip to content

Instantly share code, notes, and snippets.

@softwarespot
Last active November 27, 2015 20:20
Show Gist options
  • Save softwarespot/d265771e57ddbdbd6c60 to your computer and use it in GitHub Desktop.
Save softwarespot/d265771e57ddbdbd6c60 to your computer and use it in GitHub Desktop.
JSHint configuration
// Documentation: jshint.com/docs
// Based on Airbnb's JavaScript Style Guide, URL: https://github.com/airbnb/javascript
{
// Enforcing Options
// Force curly braces around blocks in loops and conditionals
"curly": true,
// Prohibit use of == and != in favour of === and !==
"eqeqeq": true,
// for in loops should filter object items
"forin": true,
// Prohibit use of a variable before it is defined
"latedef": true,
// Prohibit use of arguments.caller and arguments.callee
"noarg": true,
// Prohibit use of the comma operator
"nocomma": true,
// Prohibit the use of constructor functions
"nonew": true,
// Prohibit the use of explicitly undeclared variables
"undef": true,
// Warn against unused variables
"unused": true,
// Relaxing Options
// Suppress warning about the use of == null
"eqnull": false,
// Environments
// Define globals exposed by modern browsers
"browser": true,
// Define globals exposed for poorman's debugging
"devel": false,
// Define globals exposed by jasmine
"jasmine": true,
// Define globals exposed by jQuery
"jquery": true,
// Define globals exposed by Node.js
"node": true,
// Allow the use of ES2015. Note: Deprecated in the next major version. See esversion
"esnext": true
}
// Note: Remove the comments when adding to the project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment