Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native-community/eslint and TypeScript 3.7 #27690

Closed
sidferreira opened this issue Jan 6, 2020 · 10 comments
Closed

react-native-community/eslint and TypeScript 3.7 #27690

sidferreira opened this issue Jan 6, 2020 · 10 comments
Labels
DX Issues concerning how the developer experience can be improved. Resolution: PR Submitted A pull request with a fix has been provided. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@sidferreira
Copy link

sidferreira commented Jan 6, 2020

react-native-community/eslint uses

    "@typescript-eslint/eslint-plugin": "^1.5.0",
    "@typescript-eslint/parser": "^1.5.0",
    "prettier": "1.17.0"

which are limited to TypeScript 3.5.*, blocking features like null coalescing and optional chaining. With the overrides below I managed to skip such errors and get only the errors I really had to deal with.

  "resolutions": {
    "**/@typescript-eslint/eslint-plugin": "2.15.0",
    "**/@typescript-eslint/parser": "2.15.0",
    "**/prettier": "1.19.1"
  },

I can create a PR fixing it if you guys want


React Native version:

info Fetching system and libraries information...
System:
    OS: macOS 10.15.2
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node
    Yarn: 1.19.1 - /usr/local/bin/yarn
    npm: 6.12.1 - ~/.nvm/versions/node/v12.13.1/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 23, 27, 28, 29
      Build Tools: 28.0.3, 29.0.2
      System Images: android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5900203
    Xcode: 11.3/11C29 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.4 => 0.61.4

Steps To Reproduce

  1. https://facebook.github.io/react-native/docs/typescript#adding-typescript-to-an-existing-project
  2. Use TypeScript 3.7 and react-native-community/eslint:0.0.6
@sidferreira sidferreira added the Bug label Jan 6, 2020
@react-native-bot
Copy link
Collaborator

Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety?

👉 Click here if you want to take another look at the Bug Report issue template.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Resolution: Needs More Information labels Jan 6, 2020
@hramos hramos added Needs: Triage 🔍 and removed Bug Needs: Author Feedback Ran Commands One of our bots successfully processed a command. labels Jan 30, 2020
@Hoffi-Coffi
Copy link

+1

1 similar comment
@antt001
Copy link

antt001 commented Feb 26, 2020

+1

@romain-faust
Copy link

There is an open PR that could resolve the issue once merged.

@safaiyeh safaiyeh added Resolution: PR Submitted A pull request with a fix has been provided. DX Issues concerning how the developer experience can be improved. and removed Needs: Triage 🔍 labels Mar 20, 2020
@Naturalclar
Copy link
Contributor

the community eslint config has updated prettier to v2 in this commit 89d04b5#diff-07d8dac5e415f4617208ba79d55bc35f which should resolve the issue

@Naturalclar
Copy link
Contributor

I believe this issue is resolved, as @react-native-community/eslint-config v1.0.0 supports newer version of typescript-estree and prettier

@hannojg
Copy link
Contributor

hannojg commented Apr 21, 2020

Have just tested it with 1.1.0 doesn't seem to work (at least for me)
// EDIT: sorry just had to restart the IDE, works now 😊

@sidferreira
Copy link
Author

Now my only problem is that it ignores our .prettierrc...

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Mar 29, 2023
@github-actions
Copy link

github-actions bot commented Apr 5, 2023

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as completed Apr 5, 2023
@facebook facebook locked as resolved and limited conversation to collaborators Apr 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
DX Issues concerning how the developer experience can be improved. Resolution: PR Submitted A pull request with a fix has been provided. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

9 participants