jfmengels / elm-lint / Lint.Project

Represents project-related data, that a rule can access to get more information.

These will be accessible in rules with functions like Lint.Rule.withElmJsonVisitor. This module is made to build all of the project-related data that we want rules to have access to, to later pass it to the Lint.lint function.

Definition


type Project

Represents all kinds of details about the project, such as the contents of the elm.json file.


type alias ElmJson =
Elm.Project.Project

Contents of the elm.json file. Alias to elm/project-metadata-utils's Project data structure.

Access

elmJson : Project -> Maybe ElmJson

Get the contents of the elm.json file, if available.

This will give you a Project type from the elm/project-metadata-utils package, so you will need to install and use it to gain access to the information inside the elm.json file.

Build

new : Project

Create a new Project.

withElmJson : ElmJson -> Project -> Project

Add the contents of the elm.json file to the project details.