eslint - Optional chaining error with vscode
问题 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 Here's my setup: node 14.1.0 eslint "^6.8.0" .eslintrc.js module.exports = { "env": { "node": true }, "extends": [ "eslint:recommended", ], "parserOptions": { "sourceType": "module", "ecmaVersion": 2020 }, "rules": { }, } 回答1: You should use babel-eslint with your eslint config. This allows you to lint ALL valid Babel code with eslint. Currently eslint does not support all ES2020 features