-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
status: ready to implementis ready to be worked on by someoneis ready to be worked on by someone
Description
What is the problem you're trying to solve?
see:
- Encourage using common keywords for plugins, configs, and formatters in documentation stylelint#7857 (review)
- https://github.com/csstools/postcss-plugins/blob/e8809370ba61f406c3063b7a7566faf3223c4aae/packages/postcss-tape/src/index.ts#L98-L141
testRule and testRuleConfigs help people to write rule tests (as the name suggess :D ) but maintaining a good npm package with a Stylelint rule goes beyond writing rules.
For the PostCSS plugins we author under @csstools we found that we make the same mistakes over and over again and that we weren't following the PostCSS guidelines for plugins.
Things we often did wrong:
- name doesn't start with
postcss- postcss-pluginwas missing fromkeywordspostcsswas not a peer dependency
In Stylelint we also have guidelines and docs for writing rules and they contain similar aspects: https://github.com/stylelint/stylelint/blob/main/docs/developer-guide/plugins.md#peer-dependencies
What solution would you like to see?
Maybe we can create a getTestPackage function that contains tests for package.json?
This has two benefits:
- it is easier for authors to be consistent
- we can amend the guidelines and use this test as a way to communicate and promote the new guidelines
ybiquitous
Metadata
Metadata
Assignees
Labels
status: ready to implementis ready to be worked on by someoneis ready to be worked on by someone