Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sparksp/elm-review-ports
Provides elm-review rules to detect errant elm ports.
https://github.com/sparksp/elm-review-ports
elm elm-review review-ports
Last synced: 3 months ago
JSON representation
Provides elm-review rules to detect errant elm ports.
- Host: GitHub
- URL: https://github.com/sparksp/elm-review-ports
- Owner: sparksp
- License: mit
- Created: 2020-04-27T20:19:56.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-01T17:10:37.000Z (3 months ago)
- Last Synced: 2024-11-01T18:19:42.962Z (3 months ago)
- Topics: elm, elm-review, review-ports
- Language: Elm
- Homepage: https://package.elm-lang.org/packages/sparksp/elm-review-ports/latest/
- Size: 607 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-review-ports
![elm package](https://img.shields.io/elm-package/v/sparksp/elm-review-ports)
![elm-review 2.6](https://img.shields.io/badge/elm--review-2.6-%231293D8)
![elm 0.19](https://img.shields.io/badge/elm-0.19-%231293D8)
![Tests](https://github.com/sparksp/elm-review-ports/workflows/Tests/badge.svg)Provides [`elm-review`](https://package.elm-lang.org/packages/jfmengels/elm-review/latest/) rules to detect errant elm ports.
## Provided rules
- [`NoDuplicatePorts`](https://package.elm-lang.org/packages/sparksp/elm-review-ports/1.3.1/NoDuplicatePorts) - Ensure that port names are unique across your project.
- [`NoUnsafePorts`](https://package.elm-lang.org/packages/sparksp/elm-review-ports/1.3.1/NoUnsafePorts) - Forbid unsafe types in ports.
- [`NoUnusedPorts`](https://package.elm-lang.org/packages/sparksp/elm-review-ports/1.3.1/NoUnusedPorts) - Ensure that all defined ports have been used.## Configuration
```elm
import NoDuplicatePorts
import NoUnsafePorts
import NoUnusedPorts
import Review.Rule exposing (Rule)config : List Rule
config =
[ NoDuplicatePorts.rule
, NoUnsafePorts.rule NoUnsafePorts.any
, NoUnusedPorts.rule
]
```## Try it out
You can try the example configuration above out by running the following command:
```bash
elm-review --template sparksp/elm-review-ports/example
```