Skip to content

Commit 9b4a45b

Browse files
authored
Merge pull request #49 from primer/markdowneditor-slots
Include MarkdownEditor in direct-slot-children rule
2 parents e6ce287 + ad22b85 commit 9b4a45b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.changeset/eighty-seas-study.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-primer-react": major
3+
---
4+
5+
`direct-slot-children`: Add checks for `MarkdownEditor` slot children

src/rules/direct-slot-children.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ const slotParentToChildMap = {
1111
'NavList.Item': ['NavList.LeadingVisual', 'NavList.TrailingVisual'],
1212
'TreeView.Item': ['TreeView.LeadingVisual', 'TreeView.TrailingVisual'],
1313
RadioGroup: ['RadioGroup.Label', 'RadioGroup.Caption', 'RadioGroup.Validation'],
14-
CheckboxGroup: ['CheckboxGroup.Label', 'CheckboxGroup.Caption', 'CheckboxGroup.Validation']
15-
// Ignore `MarkdownEditor` for now because it's still in drafts
16-
// MarkdownEditor: ['MarkdownEditor.Toolbar', 'MarkdownEditor.Actions', 'MarkdownEditor.Label'],
14+
CheckboxGroup: ['CheckboxGroup.Label', 'CheckboxGroup.Caption', 'CheckboxGroup.Validation'],
15+
MarkdownEditor: ['MarkdownEditor.Toolbar', 'MarkdownEditor.Actions', 'MarkdownEditor.Label']
1716
}
1817

1918
const slotChildToParentMap = Object.entries(slotParentToChildMap).reduce((acc, [parent, children]) => {

0 commit comments

Comments
 (0)