https://github.com/lue-bird/elm-review-action
add a comment and let me transform your code
https://github.com/lue-bird/elm-review-action
assist code-action elm elm-review inline refactor
Last synced: 2 days ago
JSON representation
add a comment and let me transform your code
- Host: GitHub
- URL: https://github.com/lue-bird/elm-review-action
- Owner: lue-bird
- License: mit
- Created: 2024-10-10T03:48:37.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-10-12T21:22:36.000Z (7 months ago)
- Last Synced: 2025-05-03T10:47:37.876Z (7 days ago)
- Topics: assist, code-action, elm, elm-review, inline, refactor
- Language: Elm
- Homepage:
- Size: 34.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changes.md
- License: LICENSE
Awesome Lists containing this project
README
The [`elm-review`](https://dark.elm.dmy.fr/packages/jfmengels/elm-review/latest/) rule
[`Review.Action`](https://dark.elm.dmy.fr/packages/elm-review-action/1.0.1/Review-Action)
transforms your code as specified by comments like `--!inline` or `--!remove`.### try it
```bash
elm-review --template lue-bird/elm-review-action/example
```### add it to your project
```elm
module ReviewConfig exposing (config)import Review.Action
import Review.Ruleconfig : List Review.Rule.Rule
config =
[ Review.Action.rule
]
```### this should be a language server code action
But I can't be bothered to write ts.
The user experience won't be much worse
since elm-review is supported by the language server.### future action candidates
- ❇ [your most common refactor kind](https://github.com/lue-bird/elm-review-action/issues/new). Make sure an actual review rule isn't better suited
- inline selected core implementations like Maybe.map, Result.withDefault or List.head
- "backwards inline" a value/function/alias type (inline it in all places it's used)
- inline values, types
- where to put the comment so it can be recognized? On the same line as a single-line comment?
- `| Variant {-!remove-} ...`: remove the variant declaration and the cases matching on it
- elm-review does not have cross-file fixes
- `functionDeclaration argumentA {-!swap-} argumentB`: move arguments a and b in the declaration and all uses
- elm-review does not have cross-file fixes