Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#### smarthr-uiの対象要素

- AccordionPanel
- Accordion
- Anchor
- Checkbox
- Date
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const INTERACTIVE_COMPONENT_NAMES = `(${[
'(L|l)egend(s)$',
'(S|s)elect(s)?',
'(T|t)extarea(s)?',
'AccordionPanel(s)?',
'Accordion(Panel)?(s)?',
'Anchor',
'DisclosureTrigger?',
'DropZone(s)?',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ const EXPECTED_NAMES = {
'(S|^s)ection$': 'Section$',
'(S|^s)elect$': 'Select$',
'(T|^t)extarea$': 'Textarea$',
'AccordionPanel$': 'AccordionPanel$',
'Accordion$': 'Accordion$',
'AccordionPanel$': 'AccordionPanel$', // 後方互換性のために残す
'ActionDialogWithTrigger$': 'ActionDialogWithTrigger$',
'Anchor$': 'Anchor$',
'AnchorButton$': 'AnchorButton$',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const INTERACTIVE_COMPONENT_NAMES = `(${[
'(L|l)egend(s)$',
'(S|s)elect(s)?',
'(T|t)extarea(s)?',
'AccordionPanel(s)?',
'Accordion(Panel)?(s)?',
'Anchor',
'DisclosureTrigger?',
'DropZone(s)?',
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin-smarthr/test/component-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ ruleTester.run('component-name', rule, {
{ code: `import { FormDialog as HogeDialog } from './hoge'`, errors: [ { message: messageImportAs({ extended: 'HogeDialog', matcher: /FormDialog$/, base: 'FormDialog' }) } ] },
{ code: 'const PaginationFuga = styled(FugaPagination)``', errors: [ { message: messageInheritance({ extended: 'PaginationFuga', matcher: /Pagination$/ }) } ] },
{ code: `import { HogeSideNav as Hoge } from './hoge'`, errors: [ { message: messageImportAs({ extended: 'Hoge', matcher: /Nav$/, base: 'HogeSideNav' }) }, { message: messageImportAs({ extended: 'Hoge', matcher: /SideNav$/, base: 'HogeSideNav' }) } ] },
{ code: 'const AccordionAny = styled(FugaAccordion)``', errors: [ { message: messageInheritance({ extended: 'AccordionAny', matcher: /Accordion$/ }) } ] },
{ code: 'const AccordionPanelAny = styled(FugaAccordionPanel)``', errors: [ { message: messageInheritance({ extended: 'AccordionPanelAny', matcher: /AccordionPanel$/ }) } ] },
{ code: `import { HogeFilterDropdown as Hoge } from './hoge'`, errors: [ { message: messageImportAs({ extended: 'Hoge', matcher: /FilterDropdown$/, base: 'HogeFilterDropdown' }) } ] },
{ code: `const Hoge = styled.fieldset`, errors: [ { message: messageInheritance({ extended: 'Hoge', matcher: /Fieldset$/ }) } ] },
Expand Down