Skip to content
New issue

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

Support conditional chain operator (?.) #88

Open
maclockard opened this issue Sep 30, 2021 · 2 comments
Open

Support conditional chain operator (?.) #88

maclockard opened this issue Sep 30, 2021 · 2 comments

Comments

@maclockard
Copy link
Contributor

Currently get this stack trace when calling a function with a conditional chain operator upon initialization:

[Error - 10:22:26 PM] TypeError: Cannot read property 'hasValue' of undefined
Occurred while linting /Users/maclockard/workspace/hex-inc/hex/packages/client/components/markdown/MarkdownSanitizeSchema.ts:2
    at Object.|| (/Users/maclockard/workspace/hex-inc/hex/node_modules/eslint-plugin-tree-shaking/lib/rules/no-side-effects-in-initialization.js:152:22)
    at Object.getValueAndReportEffects (/Users/maclockard/workspace/hex-inc/hex/node_modules/eslint-plugin-tree-shaking/lib/rules/no-side-effects-in-initialization.js:663:48)
    at reportSideEffects (/Users/maclockard/workspace/hex-inc/hex/node_modules/eslint-plugin-tree-shaking/lib/rules/no-side-effects-in-initialization.js:907:24)
    at /Users/maclockard/workspace/hex-inc/hex/node_modules/eslint-plugin-tree-shaking/lib/rules/no-side-effects-in-initialization.js:256:43
    at Array.forEach (<anonymous>)
    at Object.reportEffects (/Users/maclockard/workspace/hex-inc/hex/node_modules/eslint-plugin-tree-shaking/lib/rules/no-side-effects-in-initialization.js:256:24)
    at reportSideEffects (/Users/maclockard/workspace/hex-inc/hex/node_modules/eslint-plugin-tree-shaking/lib/rules/no-side-effects-in-initialization.js:905:24)
    at /Users/maclockard/workspace/hex-inc/hex/node_modules/eslint-plugin-tree-shaking/lib/rules/no-side-effects-in-initialization.js:734:11
    at Array.forEach (<anonymous>)
    at Object.reportEffects (/Users/maclockard/workspace/hex-inc/hex/node_modules/eslint-plugin-tree-shaking/lib/rules/no-side-effects-in-initialization.js:732:25)
@thorsent
Copy link

thorsent commented Jun 6, 2022

+1

@lukastaegert
Copy link
Owner

PR welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants