ERROR: no-unsafe-optional-chaining
See original GitHub issueI followed the setup instructions exactly but I get the error:
ERROR in src/components/Contract/Contract.jsx
Line 90:34: Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError no-unsafe-optional-chaining
I also get 99 warnings about URLs that look like:
WARNING in ./node_modules/antd/dist/antd.css (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./node_modules/antd/dist/antd.css)
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack://antd/./components/time-picker/style/index.less' URL is not supported
@ ./node_modules/antd/dist/antd.css 8:6-231 22:17-24 26:7-21 58:25-39 59:36-47 59:50-64 63:6-73:7 64:54-65 64:68-82 70:42-53 70:56-70 72:21-28 83:0-201 83:0-201 84:22-29 84:33-47 84:50-64 61:4-74:5
@ ./src/App.jsx 18:0-28
@ ./src/index.js 6:0-24 24:35-38
I have uninstalled and reinstalled yarn, and deleted and redid the ethereum-boilerplate setup. No matter what, I get 99 warnings and this error. I am on Manjaro Linux.
Issue Analytics
- State:
- Created 2 years ago
- Comments:17
Top Results From Across the Web
no-unsafe-optional-chaining - Pluggable JavaScript Linter
This rule aims to detect some cases where the use of optional chaining doesn't prevent runtime errors. In particular, it flags optional chaining...
Read more >JavaScript's unsafe optional chaining is crazy
no-unsafe-optional-chaining is an amazing eslint rule, which help us identify what are we doing wrong with optional chaining and disallows ...
Read more >no-unsafe-optional-chaining does not work with "||" or condition
no -unsafe-optional-chaining is an amazing eslint rule, which help us identify why we are doing wrong with optional chaining.
Read more >Add config for no-unsafe-optional-chaining to catch ... - GitHub
I'm this case. .c is always evaluated regardless of the result of a?.b , which can be undefined and cause an error, so...
Read more >Solved: Optional Chaining no-unused-expressions ESLint Error
Fix for "no-unused-expressions" ESLint error when using JavaScript optional chaining ... If you're seeing the " no-unused-expressions " ESLint ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Change
for (let method of contract?.abi )
tofor (let method of contract?.abi ?? method)
It works for me. macOS Monterey
The errors magically stopped, but it was all pretty buggy and would randomly crash.
I ended up just building my own thing from scratch. It was faster than trying to get this working