type Props = {};
export default class App extends Component<Props> {
VSCode version: 1.20.1
OS platform and version:
Mac OS High Sierra
Hi @leejones45, sorry for the delayed response and thanks for reaching us. Could you please take a look at https://github.com/Microsoft/vscode/issues/5214#issuecomment-304566827 and let me know if it helps?
I followed instructions in that thread and solved my issues. Thanks.
I don't understand, why completely disabling JavaScript validation in VS is considered a valid solution? This isn't fixing the problem, it just hides and makes VS less usable.
I'm here from google.. can't believe this issue still hasn't been fixed!
For those still hitting this.. just set this in your preferences:
"javascript.validate.enable": false,
I'm about to teach a whole workshop full of people that you need to do this to use flow with VSCode.. which makes VSCode look very poorly suited for JS!
I also use VSCode and a fix that I found was to change from this:
type Props = {};
export default class App extends Component<Props> {
to just this:
export default class App extends React.Component {
i.e. get rid of the type Props, and then change the App class' superclass from Component
Everything now works as expected. A bit odd that the default does not work in VSCode, I'm yet to find anything in the market place that adds support as well, but definitely seems to be a VSCode issue rather than a React-Native problem.
Hope this helps!
@ericvicenti What do you recommend for JS instead of vscode?
VSCode is still my favorite editor right now for JS, but I am confused by this configuration. Editors like Atom and Sublime Text do not have problems like this. Its still not clear why I have to disable "JS validation" in order to use a type system like flow..
Just install the new version of ESLint extension and be happy.
@FaustoCouto it seemed to work for a few seconds, and then the error returns
I really don't understand why this bug still cannot be fixed ? :\
Hi @buiqtuan. As it was explained before, extension itself have no control over managing this and all we can advice here is to use workarounds or ignore this error.
I have referenced this to the following issue in vscode repo: https://github.com/Microsoft/vscode/issues/49894 so I believe the better place for tracking status/leave feedback now is there.
Most helpful comment
I don't understand, why completely disabling JavaScript validation in VS is considered a valid solution? This isn't fixing the problem, it just hides and makes VS less usable.