ESLint:赋值函数参数'element'的属性(no-param-reassign)

时间:2016-11-03 16:50:23

标签: javascript ecmascript-6 eslint

export const displayElement = (element) => element.style.display = 'block';

错误:

Assignment to property of function parameter 'element' (no-param-reassign).

这是来自airbnb eslint的设置。事实是,我不知道如何实现这一目标。分配样式属性的推荐方法是什么?

0 个答案:

没有答案
相关问题