You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ mkdir eslint-config-repro
$ cd .\eslint-config-repro
$ npm install eslint @mysticatea/eslint-plugin
added 167 packages, and audited 168 packages in 15s
17 packages are looking for funding
run `npm fund` for details
10 moderate severity vulnerabilities
To address all issues, run:
npm audit fix
Run `npm audit` for details.
$ cp ../test.js test.js # put the code above
$ npx eslint --plugin "@mysticatea" --rule "@mysticatea/prefer-for-of: error" --parser-options=ecmaVersion:6 test.js
TypeError: Cannot read properties of null (reading 'type')
Occurred while linting C:\Users\hakatashi\Documents\GitHub\eslint-config-repro\test.js:2
at getElementVariableDeclaration (C:\Users\hakatashi\Documents\GitHub\eslint-config-repro\node_modules\@mysticatea\eslint-plugin\lib\rules\prefer-for-of.js:366:25)
at fixForStatement (C:\Users\hakatashi\Documents\GitHub\eslint-config-repro\node_modules\@mysticatea\eslint-plugin\lib\rules\prefer-for-of.js:478:21)
at normalizeFixes (C:\Users\hakatashi\Documents\GitHub\eslint-config-repro\node_modules\eslint\lib\linter\report-translator.js:178:28)
at C:\Users\hakatashi\Documents\GitHub\eslint-config-repro\node_modules\eslint\lib\linter\report-translator.js:343:49
at Object.report (C:\Users\hakatashi\Documents\GitHub\eslint-config-repro\node_modules\eslint\lib\linter\linter.js:905:41)
at ForStatement:exit (C:\Users\hakatashi\Documents\GitHub\eslint-config-repro\node_modules\@mysticatea\eslint-plugin\lib\rules\prefer-for-of.js:610:29)
at C:\Users\hakatashi\Documents\GitHub\eslint-config-repro\node_modules\eslint\lib\linter\safe-emitter.js:45:58
at Array.forEach (<anonymous>)
at Object.emit (C:\Users\hakatashi\Documents\GitHub\eslint-config-repro\node_modules\eslint\lib\linter\safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (C:\Users\hakatashi\Documents\GitHub\eslint-config-repro\node_modules\eslint\lib\linter\node-event-generator.js:254:26)
Reproduction Steps
Versions
The text was updated successfully, but these errors were encountered: