jsl.node.conf 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. #
  2. # Configuration File for JavaScript Lint
  3. #
  4. # This configuration file can be used to lint a collection of scripts, or to enable
  5. # or disable warnings for scripts that are linted via the command line.
  6. #
  7. ### Warnings
  8. # Enable or disable warnings based on requirements.
  9. # Use "+WarningName" to display or "-WarningName" to suppress.
  10. #
  11. +ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent
  12. +ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity
  13. +ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement
  14. +anon_no_return_value # anonymous function does not always return value
  15. +assign_to_function_call # assignment to a function call
  16. -block_without_braces # block statement without curly braces
  17. +comma_separated_stmts # multiple statements separated by commas (use semicolons?)
  18. +comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==)
  19. +default_not_at_end # the default case is not at the end of the switch statement
  20. +dup_option_explicit # duplicate "option explicit" control comment
  21. +duplicate_case_in_switch # duplicate case in switch statement
  22. +duplicate_formal # duplicate formal argument {name}
  23. +empty_statement # empty statement or extra semicolon
  24. +identifier_hides_another # identifer {name} hides an identifier in a parent scope
  25. -inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement
  26. +incorrect_version # Expected /*jsl:content-type*/ control comment. The script was parsed with the wrong version.
  27. +invalid_fallthru # unexpected "fallthru" control comment
  28. +invalid_pass # unexpected "pass" control comment
  29. +jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax
  30. +leading_decimal_point # leading decimal point may indicate a number or an object member
  31. +legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax
  32. +meaningless_block # meaningless block; curly braces have no impact
  33. +mismatch_ctrl_comments # mismatched control comment; "ignore" and "end" control comments must have a one-to-one correspondence
  34. +misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma
  35. +missing_break # missing break statement
  36. +missing_break_for_last_case # missing break statement for last case in switch
  37. +missing_default_case # missing default case in switch statement
  38. +missing_option_explicit # the "option explicit" control comment is missing
  39. +missing_semicolon # missing semicolon
  40. +missing_semicolon_for_lambda # missing semicolon for lambda assignment
  41. +multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs
  42. +nested_comment # nested comment
  43. +no_return_value # function {name} does not always return a value
  44. +octal_number # leading zeros make an octal number
  45. +parseint_missing_radix # parseInt missing radix parameter
  46. +partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag
  47. +redeclared_var # redeclaration of {name}
  48. +trailing_comma_in_array # extra comma is not recommended in array initializers
  49. +trailing_decimal_point # trailing decimal point may indicate a number or an object member
  50. +undeclared_identifier # undeclared identifier: {name}
  51. +unreachable_code # unreachable code
  52. -unreferenced_argument # argument declared but never referenced: {name}
  53. -unreferenced_function # function is declared but never referenced: {name}
  54. +unreferenced_variable # variable is declared but never referenced: {name}
  55. +unsupported_version # JavaScript {version} is not supported
  56. +use_of_label # use of label
  57. +useless_assign # useless assignment
  58. +useless_comparison # useless comparison; comparing identical expressions
  59. -useless_quotes # the quotation marks are unnecessary
  60. +useless_void # use of the void type may be unnecessary (void is always undefined)
  61. +var_hides_arg # variable {name} hides argument
  62. +want_assign_or_call # expected an assignment or function call
  63. +with_statement # with statement hides undeclared variables; use temporary variable instead
  64. ### Output format
  65. # Customize the format of the error message.
  66. # __FILE__ indicates current file path
  67. # __FILENAME__ indicates current file name
  68. # __LINE__ indicates current line
  69. # __COL__ indicates current column
  70. # __ERROR__ indicates error message (__ERROR_PREFIX__: __ERROR_MSG__)
  71. # __ERROR_NAME__ indicates error name (used in configuration file)
  72. # __ERROR_PREFIX__ indicates error prefix
  73. # __ERROR_MSG__ indicates error message
  74. #
  75. # For machine-friendly output, the output format can be prefixed with
  76. # "encode:". If specified, all items will be encoded with C-slashes.
  77. #
  78. # Visual Studio syntax (default):
  79. +output-format __FILE__(__LINE__): __ERROR__
  80. # Alternative syntax:
  81. #+output-format __FILE__:__LINE__: __ERROR__
  82. ### Context
  83. # Show the in-line position of the error.
  84. # Use "+context" to display or "-context" to suppress.
  85. #
  86. +context
  87. ### Control Comments
  88. # Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for
  89. # the /*@keyword@*/ control comments and JScript conditional comments. (The latter is
  90. # enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason,
  91. # although legacy control comments are enabled by default for backward compatibility.
  92. #
  93. -legacy_control_comments
  94. ### Defining identifiers
  95. # By default, "option explicit" is enabled on a per-file basis.
  96. # To enable this for all files, use "+always_use_option_explicit"
  97. -always_use_option_explicit
  98. # Define certain identifiers of which the lint is not aware.
  99. # (Use this in conjunction with the "undeclared identifier" warning.)
  100. #
  101. # Common uses for webpages might be:
  102. +define __dirname
  103. +define clearInterval
  104. +define clearTimeout
  105. +define console
  106. +define exports
  107. +define global
  108. +define process
  109. +define require
  110. +define setInterval
  111. +define setTimeout
  112. +define Buffer
  113. +define JSON
  114. +define Math
  115. ### JavaScript Version
  116. # To change the default JavaScript version:
  117. #+default-type text/javascript;version=1.5
  118. #+default-type text/javascript;e4x=1
  119. ### Files
  120. # Specify which files to lint
  121. # Use "+recurse" to enable recursion (disabled by default).
  122. # To add a set of files, use "+process FileName", "+process Folder\Path\*.js",
  123. # or "+process Folder\Path\*.htm".
  124. #