.eslintrc.js 文件 rules 增加设置

// add your custom rules here
  rules: {
    // allow async-await
    'generator-star-spacing': 'off',
    // allow debugger during development
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    // 空格关闭
    'no-tabs': 'off',
    // 缩进为0
    indent: 0,
    'space-before-function-paren': 0, // 清除  function() {} 这样写报错的规则
    quotes: 0 // 清除 "" 这样写报错的规则
  }
image.png

你可能感兴趣的:(.eslintrc.js 文件 rules 增加设置)