【发布时间】:2021-06-02 15:44:03
【问题描述】:
有时在const 中我存储了一些返回React 组件的箭头函数:
export const HomeOutline = (style: ImageStyle): IconElement => (
<Icon {...style} name="home-outline" pack="material" />
);
只有在这种情况下才允许这样做,否则,我在变量中使用camelCase 和UPPER_CASE 命名约定。有办法捕获存储箭头函数的 const 吗?
【问题讨论】:
-
你违反了约定,为什么不关闭规则呢?
标签: typescript eslint