From 6f51607415e9fd52aad5f8581df35439f1f0b99a Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Thu, 19 Dec 2024 14:04:09 +1300 Subject: [PATCH] ENH Allow more modern syntax including null-coallescing --- .eslintrc.js | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index f458430..595a72e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -102,6 +102,11 @@ module.exports = { 'jasmine': true, 'browser': true }, + // Allows null coalescing and optional chaining operators. + // Airbnb uses ecmaVersion 2018 + 'parserOptions': { + 'ecmaVersion': 2020 + }, 'root': true, 'rules': Object.assign({}, todo, diff --git a/package.json b/package.json index 661b658..9e60c37 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@silverstripe/eslint-config", - "version": "1.3.0", + "version": "1.4.0", "description": "SilverStripe config files for eslint", "engines": { "node": ">=18.x"