2019-03-14 15:00:34 +01:00
# Styleguide
2019-05-19 11:38:09 +02:00
## Elixir
2019-03-14 15:00:34 +01:00
We format our code with the Elixir Formatter and check for issues with [Credo ](https://github.com/rrrene/credo ) (a few rules are not blocking).
2019-05-19 11:38:09 +02:00
Please run these two commands before pushing code:
2019-11-17 18:11:33 +01:00
2019-03-14 15:00:34 +01:00
* `mix format`
2020-01-30 20:27:25 +01:00
* `mix credo --strict -a`
2019-03-14 15:00:34 +01:00
These two commands must not return an error code, since they are required to pass inside CI.
2019-05-19 11:38:09 +02:00
## Front-end
2019-03-14 15:00:34 +01:00
2019-10-11 17:03:18 +02:00
### Linting
We use `tslint` and `eslint` with the `airbnb` preset.
Errors should be reported when the development server is running or when building a production bundle `yarn run build` .
2019-03-19 11:16:03 +01:00
2019-05-19 11:38:09 +02:00
Please run the following command before pushing code `yarn run lint` .
2019-03-22 11:04:57 +01:00
This command must not return an error code, since it's required to pass inside CI.
2019-03-19 11:16:03 +01:00
We also try to follow the [official Vue.js style guide ](https://vuejs.org/v2/style-guide/ ).
2019-10-11 17:03:18 +02:00
### Styleguide
2019-11-17 18:11:33 +01:00
We present the components used on Mobilizon's front-end here: https://framasoft.frama.io/mobilizon/frontend/. The documentation is builded through [Vue Styleguidist ](https://vue-styleguidist.github.io/ )