From f0693c7d4f24c85d4a0ef310138cd6bbc86ac6e0 Mon Sep 17 00:00:00 2001 From: Kasper Seweryn Date: Mon, 19 Jun 2023 23:24:49 +0200 Subject: [PATCH] ci(front): speedup linting with eslint by using cache Part-of: --- .gitignore | 3 +++ .gitlab-ci.yml | 3 +++ front/package.json | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 21a15bb40..865a89132 100644 --- a/.gitignore +++ b/.gitignore @@ -97,3 +97,6 @@ _build # Docker docker-bake.*.json metadata.json + +# Eslint +.eslintcache diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 690d06ccf..e2fe5bf1d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,6 +30,9 @@ variables: prefix: front-node_modules files: [front/yarn.lock] paths: [front/node_modules] + - key: + prefix: front-lint + files: [front/.eslintcache] # Cache for api related jobs # Include the python version to prevent loosing caches in the test matrix diff --git a/front/package.json b/front/package.json index 5e10356bd..dc9dcd987 100644 --- a/front/package.json +++ b/front/package.json @@ -11,7 +11,7 @@ "serve": "vite preview", "test": "vitest run", "test:unit": "vitest run --coverage", - "lint": "eslint --ext .ts,.js,.vue,.json,.html src test public/embed.html", + "lint": "eslint --cache --cache-strategy content --ext .ts,.js,.vue,.json,.html src test public/embed.html", "lint:tsc": "vue-tsc --noEmit", "fix-fomantic-css": "scripts/fix-fomantic-css.sh", "postinstall": "yarn run fix-fomantic-css"