thoughtbot / stylelint-config

A shareable stylelint configuration that enforces thoughtbot’s Sass guides.
https://thoughtbot.com
MIT License
9 stars 2 forks source link

Remove deprecated rules, but test for future ones #52

Closed nickcharlton closed 9 months ago

nickcharlton commented 9 months ago

Upgrading stylelint to v15 deprecated a bunch of rules, which are intended to be handled by Prettier instead.

This removes the style rules deprecated in that upgrade, alongside others which have changed.

To try and catch when future rules are deprecated in upgrades, we add a test to see if the rule is listed as deprecated. Unfortunately, not all plugins follow the same method signature, so we need to check if stylelint knows about the rules before asserting on them.

https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-15.md https://github.com/stylelint/stylelint-config-standard/blob/main/__tests__/index.test.mjs