Bug: (TypeError: Cannot read properties of undefined (reading 'loc')) #16219
Labels
3rd party plugin
This is an issue related to a 3rd party plugin, config, or parser
archived due to age
This issue has been archived; please open a new issue for any further discussion
Projects
Environment
Node version: v16.15.1
npm version: v8.17.0
Local ESLint version: v8.22.0
Global ESLint version: Not found
Operating System: win32 10.0.22000
What parser are you using?
@typescript-eslint/parser
What did you do?
Configuration
What did you expect to happen?
There should be no errors
What actually happened?
when i input
const
,the following error will appearParticipation
Additional comments
I am using vscode and eslint. When I enter const in the TS file, an error will be reported。
The error occurred on the node_ modules\eslint\lib\rules\indent.js,line 1513
I tried to fix it
if (node.declarations[node.declarations.length - 1]?.loc.start.line > node.loc.start.line) { }
Then this error will not occur
The text was updated successfully, but these errors were encountered: