How to use lint tools in react-native javascript development ( using Atom )?

老子叫甜甜 提交于 2019-12-12 03:36:26

问题


How to integrate lint tools in react-native javascript development ( using Atom ) ?

Are there tools that I can integrate with Atom or Visual Studio Code ( OS X) editors that will lint and detect errors as I edit an open files?

Or can you somehow execute these tool on run?

react-native run-android 
react-native run-ios

What is is a typical work-flow when using these JS and JSX lint tools?

I would like to prevent Android exceptions such as duplicate definitions of properties or functions:

React com.facebook.react.bridge.JSExecutionException: SyntaxError: Attempted to redefine property 'myPropertyName' 

My current work flow is to grep the source for cause of the redefine exception, fix, then run on Android again, fix next exception, repeat.


回答1:


Yes running Atom with linter-eslint: https://atom.io/packages/linter-eslint will do just that for you.



来源:https://stackoverflow.com/questions/37447856/how-to-use-lint-tools-in-react-native-javascript-development-using-atom

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!