Skip to content

Instantly share code, notes, and snippets.

@marfarma
Forked from jrraymond/.jshintrc
Created February 5, 2017 04:10
Show Gist options
  • Select an option

  • Save marfarma/1e02f3f1a86f0068d003cc70d68c89c0 to your computer and use it in GitHub Desktop.

Select an option

Save marfarma/1e02f3f1a86f0068d003cc70d68c89c0 to your computer and use it in GitHub Desktop.

Revisions

  1. @jrraymond jrraymond revised this gist Jan 9, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .jshintrc
    Original file line number Diff line number Diff line change
    @@ -54,7 +54,7 @@
    "supernew" : false, // wierd constructions
    "validthis" : false, // strict mode use of this in non consctructors

    //Environmentrs
    //Environment
    "browser" : true, // defines globals exposed by modern browsers
    "couch" : false, // defines globals exposed by CouchDB
    "devel" : true, // defines globals for debugging
  2. @jrraymond jrraymond revised this gist Jan 9, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions .jshintrc
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@
    "newcap" : true, // constructor functions capitalized
    "noarg" : true, // prohibits arguments.caller and arguments.callee
    "noempty" : false, // warns about empty blocks
    "nonew" : true, // constructors can"t have side effects
    "nonew" : true, // constructors can't have side effects
    "plusplus" : false, // no ++ and --
    "quotmark" : true, // enforces consistency of quotation marks (true, single, double
    "undef" : true, // prohibits use of explicitly undeclared variables
    @@ -52,7 +52,7 @@
    "shadow" : false, // variable shadowing
    "sub" : false, // [] instead of .
    "supernew" : false, // wierd constructions
    "validthis" : false, // stric mode use of this in non consctructors
    "validthis" : false, // strict mode use of this in non consctructors

    //Environmentrs
    "browser" : true, // defines globals exposed by modern browsers
  3. @jrraymond jrraymond revised this gist Jan 9, 2014. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions .jshintrc
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@
    "curly" : true, // curly braces around blocks
    "eqeqeq" : true, // no == and !=
    "es3" : false, // ECMAScript 3 specification
    "forin" : true, // for in loops must filter object"s items
    "forin" : true, // for in loops must filter object's items
    "freeze" : false, // prevent overwriting native objects
    "immed" : true, // immediate function invocations must be wrapped in ()
    "indent" : 2, // enforces specific tab width
    @@ -15,21 +15,21 @@
    "noempty" : false, // warns about empty blocks
    "nonew" : true, // constructors can"t have side effects
    "plusplus" : false, // no ++ and --
    "quotmark" : true, // enforces consistency of quotation marks (true, singl, double
    "undef" : true, // prohibits use of explicitely undeclared variables
    "quotmark" : true, // enforces consistency of quotation marks (true, single, double
    "undef" : true, // prohibits use of explicitly undeclared variables
    "unused" : true, // warns when defined variables are never used
    "strict" : true, // ECMAScript 5 strict mode
    "trailing" : true, // no trailing whitespace
    "maxparams" : 1000, // max number of parameters allowed per function
    "maxdepth" : 1000, // controls how nested blocks can be
    "maxstatements" : 1000, // max number of statements per function
    "maxcomplexity" : 1000, // cyclomaitc complexity
    "maxcomplexity" : 1000, // cyclomatic complexity
    "maxlen" : 100, // max length of a line

    //Relaxing options
    "asi" : false, // missing ;
    "boss" : false, // assignments when comparisons are expected
    "debug" : true, // debuger statements
    "debug" : true, // debugger statements
    "eqnull" : false, // == null comparisons
    "esnext" : false, // ECMAScript 6 syntax
    "evil" : false, // eval
  4. @jrraymond jrraymond created this gist Jan 9, 2014.
    84 changes: 84 additions & 0 deletions .jshintrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,84 @@
    {
    //Enforcing options
    "bitwise" : true, // no bitwise operators
    "camelcase" : true, // variable names camelCase or UPPER_CASE
    "curly" : true, // curly braces around blocks
    "eqeqeq" : true, // no == and !=
    "es3" : false, // ECMAScript 3 specification
    "forin" : true, // for in loops must filter object"s items
    "freeze" : false, // prevent overwriting native objects
    "immed" : true, // immediate function invocations must be wrapped in ()
    "indent" : 2, // enforces specific tab width
    "latedef" : true, // prohibits use of variable before it is defined
    "newcap" : true, // constructor functions capitalized
    "noarg" : true, // prohibits arguments.caller and arguments.callee
    "noempty" : false, // warns about empty blocks
    "nonew" : true, // constructors can"t have side effects
    "plusplus" : false, // no ++ and --
    "quotmark" : true, // enforces consistency of quotation marks (true, singl, double
    "undef" : true, // prohibits use of explicitely undeclared variables
    "unused" : true, // warns when defined variables are never used
    "strict" : true, // ECMAScript 5 strict mode
    "trailing" : true, // no trailing whitespace
    "maxparams" : 1000, // max number of parameters allowed per function
    "maxdepth" : 1000, // controls how nested blocks can be
    "maxstatements" : 1000, // max number of statements per function
    "maxcomplexity" : 1000, // cyclomaitc complexity
    "maxlen" : 100, // max length of a line

    //Relaxing options
    "asi" : false, // missing ;
    "boss" : false, // assignments when comparisons are expected
    "debug" : true, // debuger statements
    "eqnull" : false, // == null comparisons
    "esnext" : false, // ECMAScript 6 syntax
    "evil" : false, // eval
    "expr" : false, // expressions where assignment or function calls expected
    "funcscope" : false, // functions vs block scope
    "gcl" : false, // compatible with Google Closure Compiler
    "globalstrict" : false, // suppresses warning about global strict mode
    "iterator" : false, // __iterator__ property
    "lastsemic" : false, // missing semicolons
    "laxbreak" : false, // possible unsafe line breaks
    "laxcomma" : false, // comma first coding style
    "loopfunc" : true, // defining functions inside of loops
    "maxerr" : 1000, // max amount of warnings JSHint will reproduce before giving up
    "moz" : false, // using mozilla js extensions
    "multistr" : false, // multiline strings
    "notypeof" : false, // invalid typeof operator values
    "proto" : false, // __proto__ property
    "scripturl" : false, // script-targeted URLS
    "smarttabs" : false, // mixed tabs and whitespaces
    "shadow" : false, // variable shadowing
    "sub" : false, // [] instead of .
    "supernew" : false, // wierd constructions
    "validthis" : false, // stric mode use of this in non consctructors

    //Environmentrs
    "browser" : true, // defines globals exposed by modern browsers
    "couch" : false, // defines globals exposed by CouchDB
    "devel" : true, // defines globals for debugging
    "dojo" : false, // Dojo Toolkit
    "jquery" : true, // JQuery library
    "mootools" : false, // MooTools framework
    "node" : false, // Node runtime environment
    "nonstandard" : false, // nonstandard widely accepted globals
    "phantom" : false, // PhantomJS runtime environment
    "prototypejs" : false, // Prototype framework
    "rhino" : false, // Rhino runtime environment
    "worker" : false, // Web Worker
    "wsh" : false, // Windows Script Host
    "yui" : false, // YUI framework

    //Custom globals
    "predef" : [

    ],

    //Legacy
    "nomen" : false, // disallows dangling _ in variables
    "onevar" : false, // only one var per function
    "passfail" : false, // jshint stop at first error
    "white" : false // checks against Crockfords style

    }