ESLint那些坑

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 srccomponents odosToDoListList.vue:64:25 this.$router.push('/home/edittodo/' + i);

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

原文地址:https://www.cnblogs.com/zhaohui-116/p/12416359.html