Skip to content

"no-unused-prop-types" inside async functions (include arrow) #1053

Closed
@isnifer

Description

@isnifer

Hi!
I think there is a bug with async functions.
property: "no-unused-prop-types"
parser: "babel-eslint@7.1.1"
where: "async functions"
example:

{
  code: [
    'export class Example extends Component {',
    '  static propTypes = {',
    '    failed: PropTypes.func.isRequired,',
    '    loadUserProfile: PropTypes.func.isRequired,',
    '  }',
    '  handleLogin = async () => {',
    '    await this.props.failed();',
    '    await this.props.loadUserProfile();',
    '  };',
    '}'
  ].join('\n'),
  parser: 'babel-eslint'
},

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions