PacktPublishing / Modernizing-Drupal-10-Theme-Development

Designing Modern Drupal Themes, Published by Packt
MIT License
36 stars 24 forks source link

Stylelint Config Rules Definitions Out of Sync with Drupal Core #53

Open aXb0t opened 6 months ago

aXb0t commented 6 months ago

I was getting a bunch of CSS linting errors like Unknown rule function-whitespace-after(...), even after syncing Stylelint version to the final branch version.

I think because we extended the core Drupal Stylelint config, we need to keep our theme Stylelint version in sync with Drupal core.

I modified my versions in web/themes/custom/alps_trips/package.json, and reinstalled everything with Yarn:

    "stylelint": "^15.7.0",
    "stylelint-config-standard": "^33.0.0",
    "stylelint-config-tailwindcss": "^0.0.7",
    "stylelint-order": "^6.0.3",

CSS Linting is working error free again.

chrisvetek commented 3 months ago

how do you reinstall it so that it doesn't re-overwrite those versions you mention above? i am going through the book now and have the same issues.

aXb0t commented 3 months ago

Hey @chrisvetek, I have been running my own fork of the project. Drupal Version 10.1.1 and stylelint 15.7 as noted.

Delete yarn.lock and run yarn clean cache possibly might help?

chrisvetek commented 3 months ago

Thanks wasn't sure if you specified the version in the yarn install command. I'll try clearing cache.

chrisvetek commented 3 months ago

i figured out how to get those versions via yarn add. thanks!