From 6c90351cd7c0190346f1ba93258f02e556e7c935 Mon Sep 17 00:00:00 2001 From: Georg Krause <mail@georg-krause.net> Date: Fri, 16 Jul 2021 18:34:46 +0000 Subject: [PATCH] Add job to lint Frontend changes --- .gitlab-ci.yml | 18 ++++++++++++++++++ front/src/EmbedFrame.vue | 1 + 2 files changed, 19 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fc4c6aa37f..da9b797584 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -117,6 +117,24 @@ flake8: paths: - "$PIP_CACHE_DIR" +eslint: + interruptible: true + image: node:12-buster + stage: lint + allow_failure: true + before_script: + - cd front + - yarn install + script: + # We search for all files ending with .vue or .js in src which changed in relation to develop + # and lint them. This way we focus on some errors instead of checking the hole repository + - export changedFiles=$(git diff --relative --name-only --diff-filter=d origin/develop -- src/ | grep -E "\.(vue|js)$") + - yarn run eslint --quiet -f table $changedFiles + cache: + key: "$CI_PROJECT_ID__eslint_npm_cache" + paths: + - front/node_modules + test_api: interruptible: true services: diff --git a/front/src/EmbedFrame.vue b/front/src/EmbedFrame.vue index 93d04d5e7b..8d0949b4fd 100644 --- a/front/src/EmbedFrame.vue +++ b/front/src/EmbedFrame.vue @@ -1,3 +1,4 @@ + <template> <main :class="[theme]"> <!-- SVG from https://cdn.plyr.io/3.4.7/plyr.svg --> -- GitLab