[英]ESLint: Parsing Error: Unexpected token ':'
I'm trying to use ESLint with Flow, but when I test it out in my file ESLint doesn't detect that I'm using static types. 我正在尝试将ESLint与Flow一起使用,但是当我在文件中对其进行测试时,ESLint不会检测到我正在使用静态类型。
var str: number = 'hello world';
What can I install or how can I make my linter ignore this? 我可以安装什么或如何使棉短绒忽略呢? The colon, specifically.
冒号,特别是。
在.eslintrc中使用babel-eslint作为解析器:
"parser": "babel-eslint",
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.