Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
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.
|
Modifier and Type | Class and Description |
---|---|
class |
BranchCoverageInstrumentationCallback
Instrument branch coverage for javascript.
|
class |
CheckTypeImportCodeReferences
Checks for invalid code references to type-only imports (i.e., goog.requireType).
|
class |
ChromePass
Compiler pass for Chrome-specific needs.
|
class |
Es6CheckModule
Checks that ES6 Modules are used correctly, and do not reference undefined keywords or features.
|
class |
Es6ConvertSuper
Converts
super.method() calls and adds constructors to any classes that lack them. |
class |
Es6ExtractClasses
Extracts ES6 classes defined in function calls to local constants.
|
class |
Es6ForOfConverter
Converts ES6 "for of" loops to ES5.
|
class |
Es6InjectRuntimeLibraries
Injects JS library code that may be needed by the transpiled form of the input source code.
|
class |
Es6NormalizeShorthandProperties
Normalizes shorthand object properties.
|
class |
Es6RenameVariablesInParamLists
Renames declarations and references in function bodies to avoid shadowing
names referenced in the parameter list, in default values or computed properties.
|
class |
Es6RewriteBlockScopedDeclaration
Rewrite "let"s and "const"s as "var"s.
|
class |
Es6RewriteBlockScopedFunctionDeclaration
Rewrite block-scoped function declarations as "let"s.
|
class |
Es6RewriteClassExtendsExpressions
Extracts ES6 class extends expressions and creates an alias.
|
class |
Es6RewriteModules
Rewrites a ES6 module into a form that can be safely concatenated.
|
class |
Es6RewriteRestAndSpread
Converts REST parameters and SPREAD expressions.
|
class |
Es6SplitVariableDeclarations
Splits variable declarations that declare multiple variables into
separate declarations, if at least one of the declarations is a
destructuring declaration.
|
class |
ImplicitNullabilityCheck
Warn about types in JSDoc that are implicitly nullable.
|
class |
J2clAssertRemovalPass
An optimization pass to remove J2CL Asserts.$assert.
|
class |
J2clChecksPass
Performs correctness checks which are specific to J2CL-generated patterns.
|
class |
J2clUtilGetDefineRewriterPass
A normalization pass to re-write Util.$getDefine calls to make them work in compiled mode.
|
class |
JsMessageVisitor
Traverses across parsed tree and finds I18N messages.
|
class |
MarkUntranspilableFeaturesAsRemoved
Looks for presence of features that are not supported for transpilation (mostly new RegExp
features).
|
class |
RewriteJsonToModule
Rewrites a JSON file to be a module export.
|
Modifier and Type | Class and Description |
---|---|
class |
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.
|
class |
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.
|
class |
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.
|
class |
CheckEmptyStatements
Check for empty statements (i.e.
|
class |
CheckEnums
Check for duplicate values in enums.
|
class |
CheckInterfaces
Checks for errors related to interfaces.
|
class |
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. |
class |
CheckMissingSemicolon
Check for statements that should end with a semicolon according to the Google style guide.
|
class |
CheckNullabilityModifiers
Checks for missing or redundant nullability modifiers.
|
class |
CheckPrimitiveAsObject
Check for explicit creation of the object equivalents of primitive types
(e.g.
|
Copyright © 2009-2019 Google. All Rights Reserved.