[英]Typescript working in VScode, but eslint emitting react/prop-types error for inferred types
In VScode it works fine because the type can be inferred from LeadInfo
.在 VScode 中它可以正常工作,因为可以从LeadInfo
推断出类型。
However, Eslint is emitting errors of missing props validation
但是,Eslint 发出missing props validation
的错误
By the way, the Column
is from React-table
and we already followed the react-table
suggested setup from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-table顺便说一句, Column
来自React-table
,我们已经按照https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-table中的react-table
建议设置
Turn off the react/prop-types
rule in your eslint config, it doesn't make much sense having on if your using TS在你的 eslint 配置中关闭react/prop-types
规则,如果你使用 TS 没有多大意义
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.