如果我使用流..
https://flowtype.org/
// @flow
var foo = (str: string) => {
return str;
};
和埃斯林特在一起
Eslint在
str: string
上报告了意外的 token 。有没有办法使Eslint忽略(或识别)流类型,而不将其报告为错误?
最佳答案
作为Hamlet mentioned,存在eslint-plugin-flowtype可以完成以下几项工作:
这是Installation Instructions和Configuration docs。