Skip to content

Updating ECMAScript version to 2018 supported by Node 10

Tomas Vik requested to merge (removed):update-eslint-to-es2018 into develop

eslint is configured to use the ECMAScript 2017 parser.

I suggest upgrading to 2018 since Node 10 fully supports it https://node.green/#ES2018.

One of the most useful features added in 2018 is spreading object properties.

All lodash extend and merge function calls can be then written more expressively: e.g.

_.extend({}, basicContext, {
    group: serializedGroup,
    isCommunityPage: true 
  }
)

simplifies to:

{
  ...basicContext,
  group: serializedGroup,
  isCommunityPage: true 
}

Follow-up from https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1354#note_147350675

Edited by 🤖 GitLab Bot 🤖

Merge request reports