不符合eslint6标准修改


一、解决办法

加注释

 if (!values.every(value => isNaN(value))) { // eslint-disable-line
加注释:eslint-disable-line可以跳过eslint6标准判断
 
二、文件设置
文件名:.eslintrc.js
'rules': {
    'global-require': 0,
    'import/no-unresolved': 0,
    'no-param-reassign': 0,
    'no-shadow': 0,
    'import/extensions': 0,
    'import/newline-after-import': 0,
    'no-multi-assign': 0,
    // allow debugger during development
    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
    // TODO:以下内容需优化
    'linebreak-style': 'off',
    'no-plusplus': 0,
    'arrow-body-style': 0,
    'prefer-destructuring': 0,
    'no-restricted-globals': 0,
  }
设置'no-restricted-globals': 0:是关闭的语法规则


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM