type sketchy_null_kind =
| SketchyNullBool
| SketchyNullString
| SketchyNullNumber
| SketchyNullMixed
| SketchyNullEnumBool
| SketchyNullEnumString
| SketchyNullEnumNumber
type sketchy_number_kind = SketchyNumberAnd
type property_assignment_kind =
| PropertyNotDefinitelyInitialized
| ReadFromUninitializedProperty
| MethodCallBeforeEverythingInitialized
| ThisBeforeEverythingInitialized
| PropertyFunctionCallBeforeEverythingInitialized
type lint_kind =
| SketchyNull of sketchy_null_kind
| SketchyNumber of sketchy_number_kind
| UntypedTypeImport
| UntypedImport
| NonstrictImport
| UnclearType
| DeprecatedType
| DeprecatedUtility
| UnsafeGettersSetters
| UnnecessaryOptionalChain
| UnnecessaryInvariant
| SignatureVerificationFailure
| ImplicitInexactObject
| UninitializedInstanceProperty
| AmbiguousObjectType
| DefaultImportAccess
| InvalidImportStarUse
| NonConstVarExport
| ThisInExportedFunction
| MixedImportAndRequire
| ExportRenamedDefault
let string_of_sketchy_null_kind = function
| SketchyNullBool
| SketchyNullEnumBool ->
"sketchy-null-bool"
| SketchyNullString
| SketchyNullEnumString ->
"sketchy-null-string"
| SketchyNullNumber
| SketchyNullEnumNumber ->
"sketchy-null-number"
| SketchyNullMixed -> "sketchy-null-mixed"
let string_of_sketchy_number_kind = function
| SketchyNumberAnd -> "sketchy-number-and"
let string_of_kind = function
| SketchyNull kind -> string_of_sketchy_null_kind kind
| SketchyNumber kind -> string_of_sketchy_number_kind kind
| UntypedTypeImport -> "untyped-type-import"
| UntypedImport -> "untyped-import"
| NonstrictImport -> "nonstrict-import"
| UnclearType -> "unclear-type"
| DeprecatedType -> "deprecated-type"
| DeprecatedUtility -> "deprecated-utility"
| UnsafeGettersSetters -> "unsafe-getters-setters"
| UnnecessaryOptionalChain -> "unnecessary-optional-chain"
| UnnecessaryInvariant -> "unnecessary-invariant"
| SignatureVerificationFailure -> "signature-verification-failure"
| ImplicitInexactObject -> "implicit-inexact-object"
| UninitializedInstanceProperty -> "uninitialized-instance-property"
| AmbiguousObjectType -> "ambiguous-object-type"
| DefaultImportAccess -> "default-import-access"
| InvalidImportStarUse -> "invalid-import-star-use"
| NonConstVarExport -> "non-const-var-export"
| ThisInExportedFunction -> "this-in-exported-function"
| MixedImportAndRequire -> "mixed-import-and-require"
| ExportRenamedDefault -> "export-renamed-default"
let kinds_of_string = function
| ->
Some
[
SketchyNull SketchyNullBool;
SketchyNull SketchyNullString;
SketchyNull SketchyNullNumber;
SketchyNull SketchyNullMixed;
SketchyNull SketchyNullEnumBool;
SketchyNull SketchyNullEnumString;
SketchyNull SketchyNullEnumNumber;
]
| -> Some [SketchyNull SketchyNullBool; SketchyNull SketchyNullEnumBool]
| -> Some [SketchyNull SketchyNullString; SketchyNull SketchyNullEnumString]
| -> Some [SketchyNull SketchyNullNumber; SketchyNull SketchyNullEnumNumber]
| -> Some [SketchyNull SketchyNullMixed]
| -> Some [SketchyNumber SketchyNumberAnd]
| -> Some [SketchyNumber SketchyNumberAnd]
| -> Some [UntypedTypeImport]
| -> Some [NonstrictImport]
| -> Some [UntypedImport]
| -> Some [UnclearType]
| -> Some [DeprecatedType]
| -> Some [DeprecatedUtility]
| -> Some [UnsafeGettersSetters]
| -> Some [UnnecessaryOptionalChain]
| -> Some [UnnecessaryInvariant]
| -> Some [SignatureVerificationFailure]
| -> Some [ImplicitInexactObject]
| -> Some [AmbiguousObjectType]
| -> Some [UninitializedInstanceProperty]
| -> Some [DefaultImportAccess]
| -> Some [InvalidImportStarUse]
| -> Some [NonConstVarExport]
| -> Some [ThisInExportedFunction]
| -> Some [MixedImportAndRequire]
| -> Some [ExportRenamedDefault]
| _ -> None
module LintKind = struct
type t = lint_kind
let compare = compare
end
module LintMap = WrappedMap.Make (LintKind)
module LintSet = Set.Make (LintKind)