Package com.google.javascript.jscomp.lint
Provides "lint" checks: Checks which are likely to provide a lot of false positives, and therefore
should not generally be turned on as errors, but which might be appropriate to include in a static
analysis tool.
-
Class Summary Class Description CheckArrayWithGoogObject Lints against passing arrays to goog.object methods with the intention of iterating over them as though with a for-in loop, which is discouraged with arrays.CheckConstantCaseNames This pass looks for module-level variable declarations that use CONSTANT_CASE, according to the Google style guide, and verifies that they are also annotated @const or are in a const clause.CheckDuplicateCase Check for duplicate case labels in a switch statement Eg: switch (foo) { case 1: case 1: } This is normally an indication of a programmer error.CheckEmptyStatements Check for empty statements (i.e.CheckEnums Check for duplicate values in enums.CheckEs6ModuleFileStructure Checks the file structure of ES6 modules.CheckEs6Modules Miscellaneous checks for style in ES6 modules.CheckExtraRequires Walks the AST looking for usages of qualified names, and 'goog.require's of those names.CheckInterfaces Checks for errors related to interfaces.CheckJSDocStyle Checks for various JSDoc-related style issues, such as function definitions without JsDoc, params with no corresponding@param
annotation, coding conventions not being respected, etc.CheckMissingSemicolon Check for statements that should end with a semicolon according to the Google style guide.CheckNoMutatedEs6Exports Checks that exports of ES6 modules are not mutated outside of module initialization.CheckNullabilityModifiers Checks for missing or redundant nullability modifiers.CheckNullableReturn Checks when a function is annotated as returning {SomeType} (nullable) but actually always returns {!SomeType}, i.e.CheckPrimitiveAsObject Check for explicit creation of the object equivalents of primitive types (e.g.CheckPrototypeProperties Checks when a mutable property is assigned to a prototype.CheckProvidesSorted Checks that goog.provide statements are sorted and deduplicated, exposing the necessary information to produce a suggested fix.CheckRequiresSorted Checks that Closure import statements (goog.require, goog.requireType, and goog.forwardDeclare) are sorted and deduplicated, exposing the necessary information to produce a suggested fix.CheckUnusedLabels Check for unused labels blocks.CheckUselessBlocks Check for useless blocks. -
Enum Summary Enum Description CheckProvidesSorted.Mode Operation modes.CheckRequiresSorted.Mode Operation modes.