In major version 15 of stylelint, the stylistic rules for things like indentation were deprecated. It is recommended to move to prettier for that. Stylelint will focus on semantic rules:
We've deprecated 76 of the rules that enforce stylistic conventions, e.g. indentation.
When we created these rules, pretty printers (like Prettier) didn't exist. They now offer a better way to consistently format code, especially whitespace. Linters and pretty printers are complementary tools that work together to help you write consistent and error-free code.
In order to cover for the deprecated rules, we should add the opinionated Prettier framework to do the format validation and reformatting.
Acceptance Criteria:
- Prettier is added to enforce the deprecated stylelint rules
- Any violations that could not be migrated are fixed
Notes:
- Wikimedia CSS style guide: https://www.mediawiki.org/wiki/Manual:Coding_conventions/CSS
- Currently used stylelint configuration: https://github.com/wikimedia/stylelint-config-wikimedia
- Stylelint -> Prettier Migration guide: https://stylelint.io/migration-guide/to-15/
- This was noticed during T332575: Chore: Update dependencies in Query Builder.