Closed firebait closed 8 years ago
Hey @firebait, .eslintrc is only for the lint settings.
What you are trying to to is to spread rest properties, this is not part of es2015 but is a state 2 proposal, so just install the state 2 presets:
npm install babel-preset-stage-2 --save-dev
and activate them via .babelrc:
{
"presets": [
"es2015",
"react",
"stage-2"
]
}
and you should be good to go.
Thanks @stylesuxx that did it.
This thread solved the problem for me. Since I was also searching the correct eslintrc config to recognize the spread operator, I will leave this here for the ones who will follow me:
// ~/.eslintrc.js
module.exports = {
'parserOptions': {
'ecmaFeatures': {
'experimentalObjectRestSpread': true
}
}, …
Hi,
I tired to do the following on a component:
and got the following:
Any ideas would be helpful. I tried adding options to the .eslintrc file with no avail.