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
TypeError: Cannot read property 'range' of null #13060
Comments
Hey @jayenashar! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite." |
Do you have multiple copies of |
i think i only have one copy
|
Could you try copying your |
i did try various package versions and cleaning package-lock.json and node_modules. i have now tried what you suggested. can reproduce with the eslintrc above. pushed to https://github.com/jayenashar/babel-issues-13060 running with |
may be worth pointing out that eslint works with either jscpd or source-map-explorer, but not both |
Thanks for the repro! It's 2 am here so I won't take a look at it now, but I'll do it in the next few days (unless @JLHwung does it first!). |
thanks for telling me how to repro! |
I can look into this! |
Oh thanks @fedeci! |
|
@fedeci I'm not sure if it's just ASTExplorer that resets the config when sharing a link, but should enable the |
It is the same for |
based on #13060 (comment) and #13060 (comment) i suspect something is duplicated, but i can't spot it. is there a way to get a list of all duplicates? |
Thanks for the reproducing repo. This is facebook/create-react-app#10636 The linting error is thrown from
which is expected since @fedeci The position of template literal is adjusted in babel/eslint/babel-eslint-parser/src/convert/convertAST.js Lines 64 to 80 in 5c0d2f6
@babel/eslint-parser .
|
That's strange, because both |
Yeah, the |
As @fedeci suggests in his comment by the link above, the issue seems to be resolved in |
Bug Report
Current behavior
Was not able to reproduce in codesandbox.
Input Code
Expected behavior
Expected an assignment or function call and instead saw an expression. (no-unused-expressions)
Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
eslintrc-that-CRA4-wont-find.json
Environment
eslint
]Possible Solution
No but my workaround is to separate the require from the optional chaining.
Additional context
The text was updated successfully, but these errors were encountered: