简体   繁体   English

eslint/lint 用于不支持的表达式和运算符

[英]eslint/lint for not supported expressions and operators

How would u implement eslint config/rules to only detect JS not supported expressions and operators for a given Node.js version对于给定的 Node.js 版本,您将如何实现 eslint 配置/规则以仅检测 JS 不支持的表达式和运算符

Example例子

If the project is using Node.js v10 than should detect this types of errors如果项目使用的是 Node.js v10,则应该检测到此类错误

  • using optional chaining (?.)使用可选链接 (?.)
  • using null coalescing operator使用 null 合并运算符
  • similar errors类似的错误

Only js not supported expressions and operators should be detected.只应检测 js 不支持的表达式和运算符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM