microsoft / microsoft/fluentui
[Feature]: create `eslint` rule to enforce style hook API consistency
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 20.3k
- Forks
- 2.9k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 46
Description
Library
React Components / v9 (@fluentui/react-components)
Describe the feature that you would like added
Add a new lint rule to enforce the style hook API contract of:
useComponentStyle(state: ComponentState) => ComponentState
That is, that all style hooks take in ComponentState and also return ComponentState.
Have you discussed this feature with our team
@hotell
Additional context
This is a follow up to #30349
Validations
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Priority
Normal
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the context in issue #30349 and the repository's existing ESLint rules for React Components. Confirm the rule's expected handling of style hooks, then add coverage showing that hooks accept and return ComponentState; done means inconsistent signatures are reported while valid ones pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, react, typescript
- Domain
- frontend, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100