-
Notifications
You must be signed in to change notification settings - Fork 143
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
no-manual-cleanup: Cannot read property 'match' of undefined #273
Comments
Hi again Ari! It's really useful you are finding those edge cases with Same thing as the previous issue you created before: It's causing issues on v3 but solved on v4 since all rules are refactorred and unexpected code is handled much better:
Anyway, you can see they are fixed on v4, but happy to keep checking others to address as much problems as we can before the release! I was planning to use |
I couldn't just leave this without debugging further. 😄 Turns out other ESLint parser such as the default espree don't output AST for this code block. They detect it as syntax error: There is an open issue at typescript-eslint related to this. typescript-eslint/typescript-eslint#1852 I would still recommend to handle this in the rule implementation. Make sure to check v4 works with typescript parser as well. |
Whoa, interesting! I've suscribed to that typescript-eslint issue. And yes, making sure v4 works with typescript parser as well is a fantastic idea, I'll add it to my lost of things when all rules are rewritten. Thank you for your help! I'll write here if I find anything else about this. |
This should be fixed on v4.0.0 The release is available on: |
Hello,
no-manual-cleanup
rule seems to crash in certain cases. This issue was spotted by automated CI run - it is not blocking my development or anything. ESlint rules should not crash in any condition since this makes all valid linting problems disappear. If this is a false flag please let me know.https://github.com/AriPerkkio/eslint-remote-tester/runs/1551964310?check_suite_focus=true
Complete list of dependencies and
.eslintrc
is available at CI runs logs, stepsRun yarn list | grep eslint
andRun yarn log --config ./plugin-configs/eslint-plugin-testing-library.config.js
.This minimal repro doesn't exactly look like a complete case. I think this should still be considered as a bug. Users will run into this while having the rule enabled and typing new import statements above function declaration. It is not desired to have linter crashing while typing.
Minimal repro:
Crash reports from real projects
Rule: no-manual-cleanup
Cannot read property 'match' of undefined Occurred while linting <text>:3
wesleyclzns/Perdita/perdita-app/src/componentes/App.js
The text was updated successfully, but these errors were encountered: