在示例代码中,ESLint始终显示错误11:34 error Parsing error: Unexpected token ..
:
const a = { b: 1, c: 2, d: 3, e: 4 };
const { b, c, ...rest } = a; // After first dot it shows error
我的eslint配置为:
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
mocha: true
},
extends: [
'standard'
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parserOptions: {
ecmaVersion: 2018,
},
rules: {
}
}