File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ describe('component rule', () => {
2323 code : 'export default function IndexPage(){return <Row><Col></Col></Row>}' ,
2424 filename : 'src/app/page.tsx' ,
2525 } ,
26+ {
27+ code : 'export default function Hello(){return <Row><Col></Col></Row>}' ,
28+ filename : 'src/components/Hello.tsx' ,
29+ } ,
2630 {
2731 code : 'export default function IndexPage(){return <Row><Col></Col></Row>}' ,
2832 filename : 'src/app/aaa/bb/cc/page.tsx' ,
Original file line number Diff line number Diff line change @@ -82,6 +82,9 @@ export const component = createRule({
8282 const isTargetComponent = ( name : string ) => name === targetComponentName
8383
8484 return {
85+ ExportDefaultDeclaration ( defaultExport ) {
86+ ok = true
87+ } ,
8588 ExportNamedDeclaration ( namedExport ) {
8689 if ( ok ) return
8790
You can’t perform that action at this time.
0 commit comments