eslintrc vue 配置 -包括tab eol intent 设置

发布日期: 2017-08-14 00:00:00
点击次数: 1068
大字 小字
// http://eslint.org/docs/user-guide/configuring

module.exports = {
  root: true,
  parser: 'babel-eslint',
  parserOptions: {
    sourceType: 'module'
  },
  env: {
    browser: true,
  },
  // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
  extends: 'standard',
  // required to lint *.vue files
  plugins: [
    'html'
  ],
  // add your custom rules here
  'rules': {
    // allow paren-less arrow functions
    'arrow-parens': 0,
    // allow async-await
    'generator-star-spacing': 0,
    // @TODO maybe [ERROR, 'smart-tabs'] will be better, we will see
    'no-mixed-spaces-and-tabs': [0, 'smart-tabs'],
    'no-tabs':'off',
    'eol-last': 0,
    "indent": 0,//缩进风格[2, 4]
    "no-unused-vars": 0, //[2, { "vars": "all", "args": "none" }],
    // allow debugger during development
    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
  }
}
返回顶部