Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/henriquecbuss/elm-review-no-function-outside-of-modules

An `elm-review` rule to forbid certain functions to be used outside of certain modules
https://github.com/henriquecbuss/elm-review-no-function-outside-of-modules

elm elm-review

Last synced: about 2 months ago
JSON representation

An `elm-review` rule to forbid certain functions to be used outside of certain modules

Awesome Lists containing this project

README

        

# elm-review-no-function-outside-of-modules

Provides [`elm-review`](https://package.elm-lang.org/packages/jfmengels/elm-review/latest/) rules to forbid using functions outside of certain modules.

## Provided rules

- [`NoFunctionOutsideOfModules`](https://package.elm-lang.org/packages/henriquecbuss/elm-review-no-function-outside-of-modules/1.0.1/NoFunctionOutsideOfModules) - Reports uses of certain functions outside of certain modules.

## Configuration

```elm
module ReviewConfig exposing (config)

import NoFunctionOutsideOfModules
import Review.Rule exposing (Rule)

config : List Rule
config =
[ NoFunctionOutsideOfModules.rule [ ( [ "Html.input" ], [ "View.Input" ] ) ]
]
```

## Try it out

You can try the example configuration above out by running the following command:

```bash
elm-review --template henriquecbuss/elm-review-no-function-outside-of-modules/example-with-no-html-input-outside-of-view
```