We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
?? is a new operator not supported by this plugin yet.
patch-package patch to fix this:
eslint-plugin-tree-shaking+1.8.0.patch
diff --git a/ node_modules/eslint-plugin-tree-shaking/lib/rules/no-side-effects-in-initialization.js b/node_modules/eslint-plugin-tree-shaking/lib/rules/no-side-effects-in-initialization.js index 16c42ca..10e4728 100644 --- a/node_modules/eslint-plugin-tree-shaking/lib/rules/no-side-effects-in-initialization.js +++ b/node_modules/eslint-plugin-tree-shaking/lib/rules/no-side-effects-in-initialization.js @@ -150,6 +150,17 @@ const reportSideEffectsInProgram = (context, programNode) => { return leftValue } return getAndReportRight() + }, + '??': (getAndReportLeft, getAndReportRight) => { + const leftValue = getAndReportLeft() + if (!leftValue.hasValue) { + getAndReportRight() + return leftValue + } + if (leftValue.value) { + return leftValue + } + return getAndReportRight() } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
?? is a new operator not supported by this plugin yet.
patch-package patch to fix this:
The text was updated successfully, but these errors were encountered: