# Copyright 2016 Google Inc. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. # This file defines the additional JS conformance tests run over lighthouse code # when compiled with the Closure Compiler. For more, see https://github.com/google/closure-compiler/wiki/JS-Conformance-Framework # Better covered by newCheckTypesAllChecks under NTI # requirement: { # type: CUSTOM # java_class: 'com.google.javascript.jscomp.ConformanceRules$BanNullDeref' # error_message: 'Dereferencing `null` or `undefined` is usually an error. See https://github.com/google/closure-compiler/wiki/JS-Conformance-Framework#bannullderef' # } requirement: { type: CUSTOM java_class: 'com.google.javascript.jscomp.ConformanceRules$BanUnknownThis' error_message: 'References to `this` that are typed as `unknown` are not allowed. See https://github.com/google/closure-compiler/wiki/JS-Conformance-Framework#banunknownthis' } requirement: { type: CUSTOM java_class: 'com.google.javascript.jscomp.ConformanceRules$BanUnknownTypedClassPropsReferences' error_message: 'References to object props that are typed as `unknown` are discouraged. See https://github.com/google/closure-compiler/wiki/JS-Conformance-Framework#banunknowntypedclasspropsreferences' } requirement: { type: CUSTOM java_class: 'com.google.javascript.jscomp.ConformanceRules$BanUnresolvedType' error_message: 'Forward-declared types must be included in the compilation. See https://github.com/google/closure-compiler/wiki/JS-Conformance-Framework#banunresolvedtype' }