我有一个 javascript 函数,例如:
delay
但是这里 ESLint 在抱怨吗?
export default () => ({
root: css`
background-color: hotpink;
margin-bottom: 1.45rem;
`,
});
或者一个功能性的 React 组件:
Missing return type on function.eslint@typescript-eslint/explicit-module-boundary-types
我喜欢编写我的功能组件,例如:
const Header: FC<Props> = ({ siteTitle }) => {
return (
<header>
<h1>
{siteTitle}
</h1>
</header>
);
};
export default Header;
但后来我也得到:const Header = ({ siteTitle }: Props) => {
return (
<header>
<h1>
{siteTitle}
</h1>
</header>
);
};
export default Header;
我该怎么办?
答案 0 :(得分:0)
@typescript-eslint/explicit-module-boundary-types": "关闭",