Spread operator and EsLint

Update as of eslint 5.0.0

Source: https://eslint.org/docs/5.0.0/user-guide/migrating-to-5.0.0

Add ecmaVersion: 2018 to parserOptions in your .eslintrc file.

{
  "extends": [
    "eslint:recommended"
  ],
  "parserOptions": {
    "ecmaVersion": 2018,
    "sourceType": "module",
    "ecmaFeatures": {
      "jsx": true,
    }
  }
}

Original answer

Add "experimentalObjectRestSpread": true to ecmaFeatures in your .eslintrc file.

Example

{
  "extends": [
    "eslint:recommended"
  ],
  "parserOptions": {
    "ecmaVersion": 6,
    "sourceType": "module",
    "ecmaFeatures": {
      "jsx": true,
      "experimentalObjectRestSpread": true
    }
  }
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)