[{"name":"NoUnused.CustomTypeConstructors","comment":" Forbid having unused custom type constructors inside the project.\n\n\n# Rule\n\n@docs rule\n\n","unions":[],"aliases":[],"values":[{"name":"rule","comment":" Forbid having unused custom type constructors.\n\n    config =\n        [ NoUnused.CustomTypeConstructors.rule []\n        ]\n\nNote that this rule reports any custom type constructor that isn't used\nanywhere _in the project_.\n\nIf the project is a package and the module that declared the type is exposed and\nthe type's constructors are exposed, then the constructors will not be reported.\n\nThis does not prevent you from using phantom types: A constructor won't be reported if\n\n  - It is the only constructor of a type that has no type variable\n  - It has no parameters\n  - It is used as an argument of a custom type, in the stead of a type variable that is not used in the definition in any of the type's constructors\n\n**Note**: At the time of writing, there may be cases where phantom types are not well detected.\nWhen an opaque type is defined in a dependency, we don't know whether a type variable should be considered as a phantom type.\n\nTherefore, sometimes this rule will need some help, by having you tell it what type variables of which type is a phantom type variable.\nThat's what the argument to the rule is for.\n\nTo explain that the `a` in `type Id a = Id String` from the `IdModule` module\ncorresponds to a phantom type variable, you would configure the rule like this:\n\n    config =\n        [ NoUnused.CustomTypeConstructors.rule\n            [ { moduleName = \"IdModule\"\n              , typeName = \"Id\"\n              , index = 0 -- Position of the phantom variable in the type's arguments\n              }\n            ]\n        ]\n\nThis rule could do a much better job than it currently does at figuring this out,\nby following the definitions of custom types and type aliases, until it finds out that the type\nvariable is not used, or that it hits the limit related to dependencies described above.\nIn the meantime, you can configure the rule with all the phantom type exceptions.\n\nI would love help with improving this :)\n\n\n## Fail\n\n    module A exposing (a)\n\n    type MyType\n        = UsedType\n        | UnusedType -- Will get reported\n\n    a =\n        UsedType\n\n\n## Success\n\n    module A exposing (ExposedType(..))\n\n    type MyType\n        = UsedType\n\n    a =\n        UsedType\n\n    type ExposedType\n        = A\n        | B\n        | C\n\n    -----------------------\n    module A exposing (..)\n\n    type ExposedType\n        = A\n        | B\n        | C\n\n","type":"List.List { moduleName : String.String, typeName : String.String, index : Basics.Int } -> Review.Rule.Rule"}],"binops":[]},{"name":"NoUnused.Dependencies","comment":" Forbid the use of dependencies that are never used in your project.\n\n\n# Rule\n\n@docs rule\n\n","unions":[],"aliases":[],"values":[{"name":"rule","comment":" Forbid the use of dependencies that are never used in your project.\n\nA dependency is considered unused if none of its modules are imported in the project.\n\n    config =\n        [ NoUnused.Dependencies.rule\n        ]\n\n","type":"Review.Rule.Rule"}],"binops":[]},{"name":"NoUnused.Exports","comment":" Forbid the use of exposed elements that are never used in your project.\n\n\n# Rule\n\n@docs rule\n\n","unions":[],"aliases":[],"values":[{"name":"rule","comment":" Report functions and types that are exposed from a module but that are never\nused in other modules.\n\nIf the project is a package and the module that declared the element is exposed,\nthen nothing will be reported.\n\n    config =\n        [ NoUnused.Exports.rule\n        ]\n\n","type":"Review.Rule.Rule"}],"binops":[]},{"name":"NoUnused.Modules","comment":" Forbid the use of modules that are never used in your project.\n\n\n# Rule\n\n@docs rule\n\n","unions":[],"aliases":[],"values":[{"name":"rule","comment":" Forbid the use of modules that are never used in your project.\n\nA module is considered used if\n\n  - it contains a `main` function (be it exposed or not)\n  - it imports the `Test` module\n  - it is imported in any other modules, even if it is not used.\n  - the project is a package and the module is part of the `elm.json`'s `exposed-modules`\n  - it is named `ReviewConfig`\n\n```elm\nconfig =\n    [ NoUnused.Modules.rule\n    ]\n```\n\n","type":"Review.Rule.Rule"}],"binops":[]},{"name":"NoUnused.Variables","comment":" Report variables or types that are declared or imported but never used inside of a module.\n\n\n# Rule\n\n@docs rule\n\n","unions":[],"aliases":[],"values":[{"name":"rule","comment":" Report variables or types that are declared or imported but never used.\n\n**NOTE**: Since `elm-review` only works in the scope of a single file, this rule\nwill not report variables that are exposed but not used anywhere in the project.\nIf you wish those to be reported, check out [`elm-xref`](https://github.com/zwilias/elm-xref).\n\n    config =\n        [ NoUnused.Variables.rule\n        ]\n\n\n## Fail\n\n    module A exposing (a)\n\n    a n =\n        n + 1\n\n    b =\n        a 2\n\n\n## Success\n\n    module A exposing (a)\n\n    a n =\n        n + 1\n\n","type":"Review.Rule.Rule"}],"binops":[]}]