Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Create React App does not lint TypeScript #152

Closed
kumar303 opened this issue Feb 6, 2019 · 7 comments
Closed

Create React App does not lint TypeScript #152

kumar303 opened this issue Feb 6, 2019 · 7 comments

Comments

@kumar303
Copy link
Contributor

kumar303 commented Feb 6, 2019

For some reason, linting is broken. I cannot get yarn react-scripts-start to show lint output.

Here's an example of how it should work. I followed these steps:

  • npx create-react-app lint
  • cd lint
  • yarn start
  • I added const unsuedVar = 2 to the top of render() in App.js

Now I see this in the console:

screenshot 2019-02-06 10 31 10

If I try to trigger the same lint error in addons-code-manager, I do not see the lint error. Instead I see Compiled successfully.

@bobsilverberg
Copy link
Contributor

Is this because we're using ESLint instead of TSLint?

@bobsilverberg
Copy link
Contributor

Scratch that - this is an ESLint error.

@kumar303
Copy link
Contributor Author

kumar303 commented Feb 6, 2019

I'm digging into it right now. So far, adding typescript to CRA seems to kill the linting features so I'm trying to figure out why.

@kumar303 kumar303 changed the title Lint reporting is broken The default Create React App linting is broken Feb 6, 2019
@kumar303
Copy link
Contributor Author

kumar303 commented Feb 6, 2019

Ah, ok, linting was never supported for TypeScript. I illustrated the problem here: facebook/create-react-app#5641 (comment)

@kumar303 kumar303 changed the title The default Create React App linting is broken Create React App does not lint TypeScript Feb 6, 2019
@kumar303 kumar303 removed their assignment Feb 7, 2019
@kumar303 kumar303 removed this from the 2019.02.14 milestone Feb 7, 2019
@willdurand
Copy link
Member

This will be fixed by #633

Screen Shot 2019-04-24 at 10 50 34

@willdurand
Copy link
Member

Fixed.

@willdurand willdurand added this to the 2019.05.09 milestone Apr 24, 2019
@AlexandraMoga
Copy link

Could you also add a qa:not needed label to this?
Thanks you

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