I'm trying to run a yarn build
command in my GitLab CI pipeline, but it fails with Prettier formatting issues that are not present when building locally. Here’s the .gitlab-ci.yml
configuration I’m using:
image: node:18
before_script:
- yarn install --cache-folder .yarn
test:
stage: test
cache:
paths:
- node_modules/
- .yarn
script:
- yarn build
artifacts:
paths:
- dist/
expire_in: 1 week
Issue I am getting:
src/store/reducers/adminSlice.ts
Line 483:5: Delete `··⏎····` prettier/prettier
Line 699:1: Delete `⏎` prettier/prettier
Line 825:66: Delete `·` prettier/prettier
Line 833:66: Delete `·` prettier/prettier
src/store/reducers/authSlice.ts
Line 49:3: Delete `⏎··` prettier/prettier
Line 263:38: Insert `·` prettier/prettier
src/store/reducers/authThunk.ts
Line 177:20: Delete `·` prettier/prettier
error Command failed with exit code 1.
info Visit for documentation about this command.
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code