Package com.google.javascript.jscomp
Class ConformanceRules
- java.lang.Object
-
- com.google.javascript.jscomp.ConformanceRules
-
@GwtIncompatible("java.lang.reflect, java.util.regex") public final class ConformanceRules extends java.lang.Object
Standard conformance rules. See third_party/java_src/jscomp/java/com/google/javascript/jscomp/conformance.proto
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConformanceRules.AbstractRule
A conformance rule implementation to support things common to all rules such as allowlisting and reporting.static class
ConformanceRules.BanCreateDom
Bangoog.dom.createDom
andgoog.dom.DomHelper#createDom
with parameters specified invalue
in the format tagname.attribute, e.g.static class
ConformanceRules.BanCreateElement
Bansdocument.createElement
and similar methods with string literal parameter specified invalue
, e.g.static class
ConformanceRules.BanExecCommand
BanDocument#execCommand
with command names specified invalue
or any dynamic string.static class
ConformanceRules.BanForOf
Banned for/of loopsstatic class
ConformanceRules.BanGlobalVars
Banned global var declarations.static class
ConformanceRules.BannedEnhance
Checks that file does not include an @enhance annotation for a banned namespace.static class
ConformanceRules.BanNullDeref
Banned dereferencing null or undefined types.static class
ConformanceRules.BanSetAttribute
BanElement#setAttribute
with attribute names specified invalue
or any dynamic string.static class
ConformanceRules.BanStaticThis
Checks thatthis
is not being referenced directly within a static member function.static class
ConformanceRules.BanThrowOfNonErrorTypes
Banned throw of non-error object types.static class
ConformanceRules.BanUnknownDirectThisPropsReferences
Banned 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 class
ConformanceRules.BanUnknownThis
Banned unknown "this" types.static class
ConformanceRules.BanUnknownTypedClassPropsReferences
Banned 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 class
ConformanceRules.BanUnresolvedType
Banned accessing properties from objects that are unresolved forward-declared type names.static class
ConformanceRules.ConformanceLevel
Possible check check resultsstatic class
ConformanceRules.ConformanceResult
Classes extending AbstractRule must return ConformanceResult from their checkConformance implementation.static class
ConformanceRules.RequireUseStrict
Require "use strict" rulestatic class
ConformanceRules.StrictBanUnresolvedType
Ban any use of unresolved forward-declared types
-