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.

eslint throwing "cannot read property 'name' of null" #593

Closed
@pietrofxq

Description

@pietrofxq

What version of TypeScript are you using?
3.1.1

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

Eslint version: 5.12.0

What code were you trying to parse?

declare module "@ajs/context-path" {
  export default function (): string;
}

and

const BaseState = ({ title, hint, src, ...props }) => (
  <MessageBox {...props}>
    <MessageImage src={src} />
    <MessageText>
      <MainMessage>{title}</MainMessage>
      <p>{hint}</p>
    </MessageText>
  </MessageBox>
)

What did you expect to happen?
No eslint errors

What happened?
image

.eslintrc:

{
  "extends": [
    "eslint:recommended",
    "plugin:react/recommended",
    "@atlassian/atlassian-fecq",
    "prettier"
  ],
  "settings": {
    "react": {
      "pragma": "React",
      "version": "^16.5.2"
    }
  },
  "parser": "typescript-eslint-parser",
  "env": {
    "es6": true,
    "browser": true,
    "node": true
  },
  "globals": {
    "I18n": true
  },
  "plugins": [
    "react",
    "typescript"
  ],
  "parserOptions": {
    "sourceType": "module",
    "ecmaFeatures": {
      "experimentalObjectRestSpread": true,
      "jsx": true
    }
  }
}

Am I missing something? Using typescript-eslint-parser disables jsx parsing even though I have jsx:true in parserOptions and throws this cannot read property 'name' of null 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