Closed ericpassmore closed 1 year ago
After some investigation, downstream clients running older node or older browsers would likely have the problem. Another option to eslint back to a common supported release. Optional Chaining was introduced in ES2020 so standardizing on ES2019 would be fairly safe. Although with downstream browsers it might be better to go further back to ES2015.
Linting would warn/error on unsupported features, but we could still compile with the latest TS release.
npm install --save-dev eslint eslint-plugin-es-x
with plugin:es/restrict-to-es2020
Project does not allow optional chaining. We should prevent optional chaining with a eslint custom rule. https://github.com/facebook/lexical/pull/3233