Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

getting Cannot read property 'type' of undefined on tsx file #172

Closed
@evollu

Description

@evollu

What version of TypeScript are you using?
2.2.1

What version of typescript-eslint-parser are you using?
2.0.0

What code were you trying to parse?


class App extends React.PureComponent<void, void> {
  render () {
    return (
      <Provider store={store}>
        <View style={{ flex: 1 }}>
          <StatusBar barStyle='light-content' />
          <Navigator />
          <Loader />
          <AlertModal />
        </View>
      </Provider>
    );
  }
}

What happened?

I get warning Cannot read property 'type' of undefined from vscode
Error from console

Cannot read property 'type' of undefined
TypeError: Cannot read property 'type' of undefined
    at EventEmitter.Literal (/Users/LLu/Code/Patient/client/node_modules/eslint/lib/rules/no-empty-character-class.js:49:26)

Extra info
I'm using eslint plugin with vscode

eslint.rc

{
  "parser": "typescript-eslint-parser",
  "parserOptions": {
    "ecmaVersion": 6,
    "sourceType": "module",
    "ecmaFeatures": {
        "jsx": true
    }
  },
  "rules": {
    "no-empty-character-class":"error"
  }
} 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions