首页 > 技术文章 > ESLint那些坑

Console-LIJIE 2020-03-04 21:39 原文

Assignment to property of function parameter 'item' 

解决:遍历时不要直接item.xxx 修改,复制一个对象,在对象上修改,如图

 

 nexpected chained assignment

解决:分开赋值,如图

 

 Expected to return a value at the end of method

解决:最后一个花括号前加个 return true;

Expected to return a value in arrow function

解决:遍历完加 return true;如图

 

 

Unexpected string concatenation src\components\todos\ToDoList\List.vue:64:25 this.$router.push('/home/edittodo/' + i);

解决:跳转路径用模板字符串拼接,如图

 

推荐阅读