Skip to content

Commit

Permalink
fix(eslint): 不支持在类参数定义 JSX
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed May 25, 2018
1 parent 114c834 commit 83fd7a0
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -11,7 +11,7 @@ module.exports = {
return {
JSXElement (node) {
const parents = context.getAncestors(node)
const classMethod = parents.find(p => p.type === 'ClassMethod')
const classMethod = parents.find(p => p.type === 'ClassMethod' || p.type === 'ClassProperty')
if (classMethod && classMethod.key.name !== 'render') {
context.report({
message: ERROR_MESSAGE,
Expand Down

0 comments on commit 83fd7a0

Please sign in to comment.