{"id":631,"hash":"713a7c0ddc21ba2dab3d79cd131813dd33a3b5800435c7eecbb0924ba1000c31","pattern":"eslint - Optional chaining error with vscode","full_message":"I am seeing a a red underline when I'm using an optional chain, but the code runs fine as I am on node 14\n\nHere's my setup:\n\nnode 14.1.0\neslint \"^6.8.0\"\n\n.eslintrc.js\n\nmodule.exports = {\n    \"env\": {\n        \"node\": true\n    },\n    \"extends\": [\n        \"eslint:recommended\",\n    ],\n    \"parserOptions\": {\n        \"sourceType\": \"module\",\n        \"ecmaVersion\": 2020\n    },\n    \"rules\": {\n    },\n}","ecosystem":"npm","package_name":"node.js","package_version":null,"solution":"You no longer need @babel/eslint-parser as eslint@^7.5 now supports optional chaining.\n\nRun the following to update eslint within your project:\n\nnpm\nnpm install --save-dev eslint@^7.5\n\nyarn\nyarn add -D eslint@^7.5\n\nAnd then, ensure your config is as follows:\n\n.eslintrc\n{\n  \"parserOptions\": {\n    \"ecmaVersion\": 2020\n  }\n}\n\n.eslint.js\nmodule.exports = {\n    \"parserOptions\": {\n        \"ecmaVersion\": 2020\n    }\n}\n\nSee https://eslint.org/blog/2020/07/eslint-v7.5.0-released#optional-chaining-support for more information.","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/61628947/eslint-optional-chaining-error-with-vscode","votes":87,"created_at":"2026-04-19T04:51:24.133291+00:00","updated_at":"2026-04-19T04:51:24.133291+00:00"}