create-elm-app
create-elm-app copied to clipboard
Elm Analyse
What do you think about to include Elm Analyse in create-elm-app for the elm-app test script? It looks promising and gives you a lot of hints what could be made better in your project.
@screendriver thanks for the suggestion! 👍
Could you please explore this idea a little more?
How would you use it?
In my book, this is a tool similar to ESLint, which probably does not belong to CEA, but we are pretty open to consideration.
tl;dr: elm-app analyse
Long version: Yes, it is a tool similar to ESLint / TSLint that analyse your code. It gives you best practices like unused imports, line length exceeded and so on. At the moment I have two build steps in my CI:
- run Elm Analyse (I added this as a dependency and run that from my package.json script)
- run
elm-app test && elm-app build(I did notejectmy project)
I could also eject my project and customize it but I believe this kind of linting is so essential that it could be added directly to create-elm-app with a task like elm-app analyse. I would not add it to elm-app build or elm-app test because it should be opt-in (like elm-test will not be executed when you run elm-app build). Almost every project that I know use some kind of linting to ensure code consistency (the same for code formatting like prettier or elm-format).