Open NotWoods opened 1 year ago
Hey @NotWoods thanks a lot for your contribution! Looks pretty cool. I think it needs more thought indeed, regarding a new category or something, as we don't want this to be enforced by default. We could potentially introduce the rule disabled by default, so users can enable when they want.
@kasperpeulen I believe you might be interested in this!
I removed the current requirement that a rule has at least one category. That should let this rule be included without getting enabled by default :)
Looks good!
Hello! Just checking in, is there any changes I need to make to this rule?
cc @yannbf
Looks great @NotWoods 🚀
Do you think we'd need a separate rule for enforcing StoryObj<typeof meta>
instead of StoryObj<typeof YourComponent>
to get full safety? (thats the only way I can get TS to complain about required props/args)
Btw, it looks like the pr contains a duplicate test file? tests/lib/rules/meta-safisfies-type.test.ts tests/lib/rules/meta-satisfies-type.test.ts
Yeah, I think that should be added as a separate rule. I'll look into fixing the duplicate file.
Hey there, I'll be checking this with @kasperpeulen this week, thanks for your patience 🙏
Hi folks, are there any changes I need to make here?
Issue: #123
What Changed
Added a new rule to check that meta is always followed by
satisfies Meta
.This probably needs a new configuration (ie
csf-typescript
) for TypeScript-only rules. I'm not sure if ESLint has a way to check the file extension or not.Checklist
Check the ones applicable to your change:
yarn update-all
Change Type
Indicate the type of change your pull request is:
maintenance
documentation
patch
minor
major