Package com.google.javascript.jscomp
Class ConformanceRules
java.lang.Object
com.google.javascript.jscomp.ConformanceRules
Standard conformance rules. See
third_party/java_src/jscomp/java/com/google/javascript/jscomp/conformance.proto
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA conformance rule implementation to support things common to all rules such as allowlisting and reporting.static final classBangoog.dom.createDomandgoog.dom.DomHelper#createDomwith parameters specified invaluein the format tagname.attribute, e.g.static final classBansdocument.createElementand similar methods with string literal parameter specified invalue, e.g.static final classBanElement#setAttributewith attribute names specified invalueor any dynamic string.static final classBanDocument#execCommandwith command names specified invalueor any dynamic string.static final classBanned for/of loopsstatic final classBanned global var declarations.static final classChecks that file does not include an @enhance annotation for a banned namespace.static final classChecks that file does not include an @mods annotation for a banned namespace regex.static final classBanned non-literal arguments passed togoog.string.Const.from.static final classBanned dereferencing null or undefined types.static final classCan be used to ban any function likeElement#setAttributewhich takes two parameters, an attribute name and a value.static final classChecks thatthisis not being referenced directly within a static member function.static final classBanned throw of non-error object types.static final classBanned unknown type references of the form "this.prop" unless it is immediately cast, it is a @template type (until template type restricts are enabled) or the value is unused.static final classBanned unknown "this" types.static final classBanned unknown type references of the form "instance.prop" unless (a) it is immediately cast/asserted, or (b) it is a @template type (until template type restrictions are enabled), or (c) the value is unused, or (d) the source object type is unknown (to avoid error cascades)static final classBanned accessing properties from objects that are unresolved forward-declared type names.static enumPossible check check resultsstatic classClasses extending AbstractRule must return ConformanceResult from their checkConformance implementation.static classRequire "use strict" rulestatic final classChecks nodes for conformance with banning the setting of attributes that are on the blocklist.static final classBan any use of unresolved forward-declared types -
Method Summary