diff --git a/.eslintrc.yml b/.eslintrc.yml index 9e282530d5..b18893b89f 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -2,6 +2,8 @@ root: true env: es6: true node: true +languageOptions: + ecmaVersion: 2022 rules: eol-last: error eqeqeq: [error, allow-null] diff --git a/lib/response.js b/lib/response.js index c14bc4b3a7..a5a33e8609 100644 --- a/lib/response.js +++ b/lib/response.js @@ -708,7 +708,7 @@ res.get = function(field){ res.clearCookie = function clearCookie(name, options) { // Force cookie expiration by setting expires to the past - const opts = Object.assign({ path: '/' } , options, { expires: new Date(1) }) + const opts = { path: '/', ...options, expires: new Date(1)}; // ensure maxAge is not passed delete opts.maxAge