Add job to lint Frontend changes

environments/review-front-fix-fhp6gl/deployments/7748
Georg Krause 2021-07-16 18:34:46 +00:00
rodzic 5fccbb9007
commit 6c90351cd7
2 zmienionych plików z 19 dodań i 0 usunięć

Wyświetl plik

@ -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:

Wyświetl plik

@ -1,3 +1,4 @@
<template>
<main :class="[theme]">
<!-- SVG from https://cdn.plyr.io/3.4.7/plyr.svg -->