.jslintrc 4.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. #
  2. # Configuration File for JavaScript Lint 0.2.6
  3. # Developed by Matthias Miller (http://www.JavaScriptLint.com)
  4. #
  5. # This configuration file can be used to lint a collection of scripts, or to enable
  6. # or disable warnings for scripts that are linted via the command line.
  7. #
  8. #### NOTE TO TEXTMATE BUNDLE USERS:
  9. #### Feel free to experiment with enabling/disabling individual warnings to
  10. #### suit your own level of anal-retentiveness.
  11. ### Warnings
  12. # Enable or disable warnings based on requirements.
  13. # Use "+WarningName" to display or "-WarningName" to suppress.
  14. #
  15. -no_return_value # function {0} does not always return a value
  16. +duplicate_formal # duplicate formal argument {0}
  17. +equal_as_assign # test for equality (==) mistyped as assignment (=)?{0}
  18. +var_hides_arg # variable {0} hides argument
  19. +redeclared_var # redeclaration of {0} {1}
  20. -anon_no_return_value # anonymous function does not always return a value
  21. +missing_semicolon # missing semicolon
  22. +meaningless_block # meaningless block; curly braces have no impact
  23. +comma_separated_stmts # multiple statements separated by commas (use semicolons?)
  24. +unreachable_code # unreachable code
  25. -missing_break # missing break statement
  26. -missing_break_for_last_case # missing break statement for last case in switch
  27. -comparison_type_conv # comparisons against null, 0, or an empty string allowing implicit type conversion (use === or !==)
  28. -inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement
  29. +useless_void # use of the void type may be unnecessary (void is always undefined)
  30. +multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs
  31. -use_of_label # use of label
  32. -block_without_braces # block statement without curly braces
  33. +leading_decimal_point # leading decimal point may indicate a number or an object member
  34. +trailing_decimal_point # trailing decimal point may indicate a number or an object member
  35. +octal_number # leading zeros make an octal number
  36. +nested_comment # nested comment
  37. +misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma
  38. -ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement
  39. -empty_statement # empty statement or extra semicolon
  40. -missing_option_explicit # the "option explicit" control comment is missing
  41. +partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag
  42. +dup_option_explicit # duplicate "option explicit" control comment
  43. -useless_assign # useless assignment
  44. +ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity
  45. +ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent)
  46. -missing_default_case # missing default case in switch statement
  47. +duplicate_case_in_switch # duplicate case in switch statements
  48. +default_not_at_end # the default case is not at the end of the switch statement
  49. +legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax
  50. +jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax
  51. +useless_comparison # useless comparison; comparing identical expressions
  52. ### Context
  53. # Show the in-line position of the error.
  54. # Use "+context" to display or "-context" to suppress.
  55. #
  56. +context
  57. ### Semicolons
  58. # By default, assignments of an anonymous function to a variable or
  59. # property (such as a function prototype) must be followed by a semicolon.
  60. #
  61. +lambda_assign_requires_semicolon
  62. ### Control Comments
  63. # Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for
  64. # the /*@keyword@*/ control comments and JScript conditional comments. (The latter is
  65. # enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason,
  66. # although legacy control comments are enabled by default for backward compatibility.
  67. #
  68. +legacy_control_comments
  69. ### Defining identifiers
  70. # By default, "option explicit" is enabled on a per-file basis.
  71. # To enable this for all files, use "+always_use_option_explicit"
  72. -always_use_option_explicit
  73. # Define certain identifiers of which the lint is not aware.
  74. # (Use this in conjunction with the "undeclared identifier" warning.)
  75. #
  76. # Common uses for webpages might be:
  77. +define window
  78. +define document
  79. #### HEY, YOU REALLY SHOULDN'T CHANGE THIS PART, DUDE,
  80. #### OR IT WILL MESS UP THE REST OF THE BUNDLE:
  81. +output-format __FILE__(__LINE__): __ERROR__