From 1309fdd3da5d4363a4ae7b0a3faf46c16013bf76 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 22 Mar 2019 11:04:57 +0100 Subject: [PATCH] Add npm run lint to CI and to docs Signed-off-by: Thomas Citharel --- .gitlab-ci.yml | 13 +++++++++++++ support/guides/development/styleguide.md | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c75990a63..f8eb5793b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -53,6 +53,19 @@ js_deps: - js/node_modules allow_failure: true +js_check: + stage: front + before_script: + - cd js + - npm install + script: + - npm run lint + after_script: + - cd ../ + cache: + paths: + - js/node_modules + elixir_check: stage: back before_script: diff --git a/support/guides/development/styleguide.md b/support/guides/development/styleguide.md index 5fd7af989..910814fdb 100644 --- a/support/guides/development/styleguide.md +++ b/support/guides/development/styleguide.md @@ -4,7 +4,7 @@ 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). -Please run those two commands before pushing codeĀ : +Please run those two commands before pushing code: * `mix format` * `mix credo` @@ -15,4 +15,8 @@ These two commands must not return an error code, since they are required to pas We use `tslint` with the `tslint-config-airbnb` preset. Errors should be reported when running in dev mode `npm run dev` or when building a production bundle `npm run build`. +Please run the following command before pushing code `npm run lint`. + +This command must not return an error code, since it's required to pass inside CI. + We also try to follow the [official Vue.js style guide](https://vuejs.org/v2/style-guide/).