Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated rules, but test for future ones #52

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

nickcharlton
Copy link
Member

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

@nickcharlton nickcharlton force-pushed the nc-fix-deprecated-rules branch 3 times, most recently from a62f70e to 4e4b000 Compare February 1, 2024 17:49
Base automatically changed from nc-test-against-sample to main February 1, 2024 17:58
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
@nickcharlton nickcharlton merged commit 9710d53 into main Feb 1, 2024
2 checks passed
@nickcharlton nickcharlton deleted the nc-fix-deprecated-rules branch February 1, 2024 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant