-
Notifications
You must be signed in to change notification settings - Fork 397
added eslint dependencies for typescript #107
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
Conversation
When I create a react native typescript project with So this pull request (or just the part of it that adds |
As far as I can tell, the default JS template only comes with I think this issue is related to the ESLint Plugin in VS Code which has a built-in linter and tries to automatically lint with that one. When I do the same without the ESLint Plugin installed, I don't get any issues. I'd like to prevent adding any additional dependencies which don't come with the default JS template and are only necessary for this scenario. |
I am closing this PR for now. I would suggest to open a PR in the React Native JS template repo to add |
The default react-native template does include When you run
Compare that to the
The only non-typescript difference is that the default template has The VSCode eslint plugin "uses the ESLint library installed in the opened workspace folder," so when I open a default react-native project in vscode, it finds eslint errors, but when I open a typescript react-native project in vscode, it does not, until I manually run |
I started a new app and confirmed that ESLint is included by default. You can check here |
Welp, seems like you are absolutely right, don't know how I missed that yesterday. /edit I don't know why it's not added there, maybe it will get removed again with the next RN version? Anyway, I released a new version of the template with added |
React native is initialised by default with eslint rules, but we need some parsers to make this work with typescript.
Test Plan
Run
yarn lint
on consoleWhat's required for testing (prerequisites)?
What are the steps to reproduce (after prerequisites)?
Compatibility
Checklist
README.md
CHANGELOG.md
example/App.js
)