- Issue created by @jwilson3
- Merge request !9Issue #3466431 by jwilson3, alok_singh: Add support for Gitlab CI โ (Merged) created by jwilson3
- ๐ช๐จEcuador jwilson3
Iโm hitting some strange inconsistencies with the way Gitlab CI runs stylelint against my theme, versus running it locally. It seems like the style rules on my local are missing stylelint-prettier or something like that. On local itโs expecting singular quotes for all CSS rules, whereas on Gitlab CI, prettier is expecting double quotes.
No errors on local Ddev site install running Drupal 10.3.1:
yarn --cwd web/core install web/core/node_modules/.bin/stylelint --ignore-path ./.stylelintignore --formatter verbose --config "web/core/.stylelintrc.json" "web/themes/contrib/rivet/**/*.css" --color 64 sources checked 0 problems found
Error on Gitlab CI:
$CI_PROJECT_DIR/$_WEB_ROOT/core/node_modules/.bin/stylelint --ignore-path ./.stylelintignore --formatter verbose --config $CI_PROJECT_DIR/$_WEB_ROOT/core/.stylelintrc.json ./**/*.css --color $_STYLELINT_EXTRA || true css/rvt-drupal-compatibility.css 144:39 โ Replace "'rvt-container'" with ""rvt-container"" prettier/prettier 196:33 โ Replace "'true'" with ""true"" prettier/prettier 200:33 โ Replace "'true'" with ""true"" prettier/prettier 207:12 โ Replace "''" with """" prettier/prettier
I'm not sure what I'm doing wrong.
- ๐ช๐จEcuador jwilson3
Was unable to figure out the stylelint issues with the doublequotes.
So I ended up applying stylelint piecemeal, in separate commits, then reverting the change to single quotes from double quotes.
This made Gitlab CI stylelint happy.
My local stylelint isn't happy, and what is worse is that
npm run build
(we use sass in the theme) generates different output that is probably going to fail stylelint again on next push ... let's see. - ๐ช๐จEcuador jwilson3
okay, it's green!
Going to do visual regression testing...
- ๐ช๐จEcuador jwilson3
Tested on a page that leverages several theme features and I'm not seeing any issues.
Going for the merge!
-
jwilson3 โ
committed 45d6625a on 1.0.x
Issue #3466431 by jwilson3, alok_singh: Add support for Gitlab CI
-
jwilson3 โ
committed 45d6625a on 1.0.x
- Status changed to Fixed
3 months ago 8:50am 7 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.