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

[Error] JSX functional component #103

Closed
oreqizer opened this issue Oct 9, 2016 · 8 comments
Closed

[Error] JSX functional component #103

oreqizer opened this issue Oct 9, 2016 · 8 comments

Comments

@oreqizer
Copy link

oreqizer commented Oct 9, 2016

What version of TypeScript are you using?
^2.0.3

What version of typescript-eslint-parser are you using?
^0.4.0

What code were you trying to parse?

screen shot 2016-10-09 at 19 51 00

What did you expect to happen?
I expected it to lint the file.

What happened?
npm-debug.txt

@oreqizer oreqizer changed the title [Error] JSX functional component component [Error] JSX functional component Oct 9, 2016
@JamesHenry
Copy link
Member

Note: We do not yet officially support TypeScript 2 (although that does not mean that it does not work in all cases).

It is not clear from your debug output that this parser, or even ESLint, is the cause of your issue. Please provide more information as to what is going wrong.

What is your ESLint config?

@oreqizer
Copy link
Author

oreqizer commented Oct 10, 2016

{
  "parser": "typescript-eslint-parser",
  "extends": ["airbnb"],
  "env": {
    "node": true,
    "jasmine": true
  },
  "globals": {
    "jest": true
  },
  "rules": {
    // conflicts with 'arrow body style'
    "no-confusing-arrow": "off",
    // due to TypeScript
    "no-undef": "off",
    "import/no-unresolved": "off",
    "import/extensions": "off",
    "react/prop-types": "off"
  }
}

@JamesHenry
Copy link
Member

Please provide actual source code as per #102 (comment)

@oreqizer
Copy link
Author

😅 sorry for me being non-predictive. I didn't take you wanting to copy the code into consideration

const Component = props => (
  <div>
    <input
        type="text"
        value={props.input.value}
        onChange={props.input.onChange}
        onFocus={props.input.onFocus}
        onBlur={props.input.onBlur}
    />
  </div>
);

@JamesHenry
Copy link
Member

JamesHenry commented Oct 13, 2016

Thanks @oreqizer, as per #105 TS 2 seems to have broken some JSX related assertions, so my top priority is getting to the bottom of those so we can fully support TS 2.

Hopefully this issue you are having will be solved by that work, but if not, I will loop back to this as soon as I am done with TS 2 support.

@JamesHenry JamesHenry added the JSX label Jan 10, 2017
@soda0289
Copy link
Member

@JamesHenry This should also be fixed by #158

@JamesHenry
Copy link
Member

We have just released 2.0.0 to support the latest stable TypeScript release.

@oreqizer Please could you see if you still have the issue with that version?

@JamesHenry
Copy link
Member

Closing as no feedback to the contrary was given. Please feel free to reopen if it is still an issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants