如何在react-native javascript开发中使用lint工具(使用Atom)? [英] How to use lint tools in react-native javascript development ( using Atom )?

查看:101
本文介绍了如何在react-native javascript开发中使用lint工具(使用Atom)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在int-native javascript开发中集成lint工具(使用Atom)?

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

是否存在可以与Atom或Visual Studio Code(OS X)编辑器集成的工具,这些工具在我编辑打开的文件时会掉毛并检测错误?

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

使用这些JS和JSX皮棉工具时,典型的工作流程是什么?

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

我想防止Android异常,例如属性或函数的重复定义:

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' 

我当前的工作流程是grep重新定义异常原因的源代码,进行修复,然后再次在Android上运行,修复下一个异常,然后重复.

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.

推荐答案

使用linter-eslint运行Atom: https://atom.io/packages/linter-eslint 会为您做到这一点.

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

这篇关于如何在react-native javascript开发中使用lint工具(使用Atom)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆