Closed as not planned
Description
Environment
Node version: v22.12.0
npm version: v10.9.0
Local ESLint version: v9.17.0
Global ESLint version: Not found
Operating System: win32 10.0.26100
What parser are you using?
Other
What did you do?
Configuration
import antfu from '@antfu/eslint-config'
export default antfu({
svelte: true,
typescript: true,
formatters: true,
})
{#if true}
{#each [1, 2, 3] as a}
{a}
<!-- eslint-disable-next-line no-unused-vars -->
{@const _ = console.error({ a })}
{/each}
{/if}
What did you expect to happen?
no error
What actually happened?
ops! Something went wrong! :(
ESLint: 9.17.0
TypeError: Cannot read properties of undefined (reading 'length')
at handleFixes (file:///home/projects/vitejs-vite-geepgmmf/node_modules/eslint/lib/rules/no-unused-vars.js#cjs:1162:48)
at Object.fix (file:///home/projects/vitejs-vite-geepgmmf/node_modules/eslint/lib/rules/no-unused-vars.js#cjs:1471:48)
at normalizeFixes (file:///home/projects/vitejs-vite-geepgmmf/node_modules/eslint/lib/linter/report-translator.js#cjs:193:28)
at eval (file:///home/projects/vitejs-vite-geepgmmf/node_modules/eslint/lib/linter/report-translator.js#cjs:223:22)
at Array.map (<anonymous>)
at mapSuggestions (file:///home/projects/vitejs-vite-geepgmmf/node_modules/eslint/lib/linter/report-translator.js#cjs:217:10)
at eval (file:///home/projects/vitejs-vite-geepgmmf/node_modules/eslint/lib/linter/report-translator.js#cjs:372:55)
at FileContext.report (file:///home/projects/vitejs-vite-geepgmmf/node_modules/eslint/lib/linter/linter.js#cjs:1062:41)
at Program:exit (file:///home/projects/vitejs-vite-geepgmmf/node_modules/eslint/lib/rules/no-unused-vars.js#cjs:1458:33)
at ruleErrorHandler (file:///home/projects/vitejs-vite-geepgmmf/node_modules/eslint/lib/linter/linter.js#cjs:1098:48)
Link to Minimal Reproducible Example
https://stackblitz.com/edit/eslint-no-unused-vars-repro?file=package.json
Participation
- I am willing to submit a pull request for this issue.
Additional comments
9.16.0 works fine.
It seems this is threw from here.
Metadata
Assignees
Labels
Type
Projects
Status
Complete
Activity