Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

ESLint is TypeScript biased--not recognizing respecting config file for ReactJS #40

Closed
che-wf opened this issue Sep 18, 2017 · 11 comments
Closed

Comments

@che-wf
Copy link

che-wf commented Sep 18, 2017

The description is misleading by suggesting "JavaScript and TypeScript". ESLint doesn't accurately recognize that the code is using jsx and not ts. I'm getting error specific to TypeScript that do not pertain to ReactJS. It would be better if the description specified only TypeScript or Diagnostics recognized jsx language and only called errors for React styles.

@Arcanemagus
Copy link

I think you mean the TypeScript compiler. ESLint has nothing to do with this package.

You can find a similar issue to what you are seeing in #19 related to flow style type definitions. This package only supports the base, standard, Javascript. Meaning no extensions on top of it.

@damieng
Copy link
Contributor

damieng commented Sep 18, 2017

Can you provide actual screenshots, repro steps and exact error messages?

@che-wf
Copy link
Author

che-wf commented Sep 18, 2017

Ah! I see what you're saying. Yes, I'm getting ts errors in my plain JS file. I was also seeing ESLint errors when I had the plugin enabled that I wasn't getting from my other ESLinting package. But that's another issue. See example in attached image.
inked30568410-ea07ef00-9c89-11e7-8728-e0803534b1bd_li

@damieng
Copy link
Contributor

damieng commented Sep 25, 2017

I think what you're actually seeing there is that the version of underlying typescript server doesn't support import etc. yet.

We need to get that updated.

@nemo
Copy link

nemo commented Sep 28, 2017

Ditto ^. I'm getting a lot of errors on jsx files (which I guess has nothing to do with them being jsx) for imports and class decorators.

@chee
Copy link

chee commented Oct 4, 2017

i'm running into this with code using the stage 3 class fields proposal and code using stage 3 dynamic import.

dynamic import seems to exist in typescript now, microsoft/TypeScript#16281

and i was sure class fields / member properties already did

ps: the title of this issue should probably change as it is inaccurate and also bizarrely combative

@chee
Copy link

chee commented Oct 4, 2017

oh the class fields thing was a false alarm caused by a dynamic import confusing and frightening typescript further up the file

@damieng
Copy link
Contributor

damieng commented Oct 4, 2017

@chee those features are in TypeScript 2.5 - we're currently locked to 2.4 as that's what the underlying language server does. It's being tracked at sourcegraph/javascript-typescript-langserver#359

@che-wf
Copy link
Author

che-wf commented Oct 4, 2017

@chee "bizarrely combative"? Not really. Assuming and misguided? Quite possibly.

Do you suggest a better title?

@chee
Copy link

chee commented Oct 4, 2017

@jbcoder that was probably just my reading of it because i hadn't had any lunch and i am frightened of capital letters

@damieng
Copy link
Contributor

damieng commented Nov 29, 2018

Should be fixed with the new ide-typescript 0.8.0 update.

@damieng damieng closed this as completed Nov 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants