Repository navigation
chore: say where hooks live, let blocks take assets and plays reach a state in skills - #214
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three skills take what the lint rules in the PRs above it settled, so each rule has a skill to point at.
react-component,flat-layers-design): in a.jsxor.tsxfile, in ahooks.ts, or in a file of ahooks/folder, wherever it stands:uikit/hooks.ts,blocks/shared/hooks.ts,blocks/shared/hooks/garden.ts. The rules of hooks and React Compiler's rules find hooks by these files, so a hook in any other module goes unchecked.hooks.tsis the one file named by kind that ashared/folder may hold, and a component's extracted logic moves fromuse[HookName].tstohooks.ts.flat-layers-design), asuikitandpagesdo: an asset imports nothing, and a block's illustration or a story's stand-in photo needs one.storybook):argTypesoptions are written inline beside their control, where a glance checks them against the type; a list too long to read there, such as every icon, comes from the component's typed constant.storybook): a story'splaybrings it into the state it shows, the way a person gets there, and asserts nothing, since a check there runs only where someone opens the story. A state the story can reach through its args, decorator or mock data takes that instead. Specs assert, and reach a story's state through the composed story'srun().🤖 Generated with Claude Code