While we wait for a fix, the below patch gets things working for me. My intention is to remove the patch when the sonarjs fix is out.
diff --git a/node_modules/eslint/lib/.DS_Store b/node_modules/eslint/lib/.DS_Store
new file mode 100644
index 0000000..23bac10
Binary files /dev/null and b/node_modules/eslint/lib/.DS_Store differ
diff --git a/node_modules/eslint/lib/rules/no-empty-function.js b/node_modules/eslint/lib/rules/no-empty-function.js
index 16e611b..665e388 100644
--- a/node_modules/eslint/lib/rules/no-empty-function.js
+++ b/node_modules/eslint/lib/rules/no-empty-function.js
@@ -122,7 +122,8 @@ module.exports = {
},
create(context) {
- const [{ allow }] = context.options;
+ const [opts] = context.options;
+ const allow = opts?.allow ?? [];
const sourceCode = context.sourceCode;
/**
diff --git a/node_modules/eslint/lib/rules/no-unused-expressions.js b/node_modules/eslint/lib/rules/no-unused-expressions.js
index fd1437c..2973453 100644
--- a/node_modules/eslint/lib/rules/no-unused-expressions.js
+++ b/node_modules/eslint/lib/rules/no-unused-expressions.js
@@ -71,12 +71,11 @@ module.exports = {
},
create(context) {
- const [{
- allowShortCircuit,
- allowTernary,
- allowTaggedTemplates,
- enforceForJSX
- }] = context.options;
+ const [opts] = context.options;
+ const allowShortCircuit = opts?.allowShortCircuit ?? false;
+ const allowTernary = opts?.allowTernary ?? false;
+ const allowTaggedTemplates = opts?.allowTaggedTemplates ?? false;
+ const enforceForJSX = opts?.enforceForJSX ?? false;
/**
* Has AST suggesting a directive.