Skip to content

Commit

Permalink
fix(eslint): Provider 加入特殊的自定义组件
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed Jun 10, 2018
1 parent a28a1e0 commit e5a900d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ ruleTester.run('custom-component-children', rule, {
code: testComponent(`<CustomComponent>
</CustomComponent>`)
}, {
code: testComponent(`<Provider><Index /></Provider>`)
}],
invalid: [{
code: testComponent(`<CustomComponent>test</CustomComponent>`),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ const DEFAULT_Components_SET = new Set([
'Canvas',
'OpenData',
'WebView',
'SwiperItem'
'SwiperItem',
'Provider'
])

const ERROR_MESSAGE = '不能在自定义组件中写 children'
Expand Down

0 comments on commit e5a900d

Please sign in to comment.