Skip to content

Instantly share code, notes, and snippets.

@neonsamurai
Last active December 29, 2015 08:29
Show Gist options
  • Save neonsamurai/7643417 to your computer and use it in GitHub Desktop.
Save neonsamurai/7643417 to your computer and use it in GitHub Desktop.
JSLint configuration for Meteor projects.
{
// JSLint Meteor Configuration File
// Match the Meteor Style Guide
//
// By @neonsamurai, forked from @raix with contributions from @aldeed and @awatson1978
//
"maxerr" : 20, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"eqeq" : false, // true: Tolerate == and !=
"forin" : false, // true: Tolerate not filtering for..in loops with obj.hasOwnProperty()
"indent" : 2, // {int} Number of spaces to use for indentation
"newcap" : false, // true: If capitalization of all constructor functions is optional e.g. `new F()`
"plusplus" : false, // true: Prohibit use of `++` & `--`
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
"unparam" : false, // true: Tolerate not all defined variables being used
"sloppy" : false, // true: Tolerate non strict mode.
"maxlen" : 80, // {int} Max number of characters per line
// Relaxing
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
// Environments
"browser" : true, // Web Browser (window, document, etc)
"devel" : true, // Development/debugging (alert, confirm, etc)
"node" : false, // Node.js
"rhino" : false, // Rhino
// Legacy
"nomen" : false, // true: Prohibit dangling `_` in variables
"passfail" : false, // true: Stop on first error
"white" : false, // true: Check against strict whitespace and indentation rules
// Custom Globals
"predef" : [
"Meteor",
"Accounts",
"Session",
"Template",
"check",
"Match",
"Deps",
"EJSON",
"Email",
"Package",
"Npm",
"Assets",
"Packages",
"process",
"Tinytest",
"$"
] // additional predefined global variables
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment