我使用的是airbnb规则进行代码eslint。
 会出现保存后,数组或者对象最后一个元素尾随逗号。
 
 此时需要在.eslintrc.js中加入下面代码即可
"comma-dangle": ["error", {"arrays": "never","objects": "never","imports": "never","exports": "never","functions": "never"
}]
官方文档:https://eslint.org/docs/rules/comma-dangle