mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Implement baseline comparison for eslint in the CI
This commit is contained in:
parent
40d733c290
commit
3ca126804b
@ -112,7 +112,17 @@ lint:
|
|||||||
- export PATH="./node_modules/.bin:$PATH"
|
- export PATH="./node_modules/.bin:$PATH"
|
||||||
script:
|
script:
|
||||||
- yarn install --ignore-optional
|
- yarn install --ignore-optional
|
||||||
- eslint --fix-dry-run --quiet
|
- apt-get update && apt-get install -y jq
|
||||||
|
- eslint "**/*.{js,vue}" --format json | jq '[.[] | select(.messages | length > 0)]' > eslint-current.json
|
||||||
|
- new_errors=$(diff <(jq -S . eslint-baseline.json) <(jq -S . eslint-current.json))
|
||||||
|
- |
|
||||||
|
if [ -n "$new_errors" ]; then
|
||||||
|
echo "New ESLint errors detected:"
|
||||||
|
echo "$new_errors"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "No new ESLint errors detected."
|
||||||
|
fi
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- node_modules/
|
- node_modules/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user