.eslintrc.js 877 B

12345678910111213141516171819202122232425262728293031
  1. module.exports = {
  2. root: true, // 查找项
  3. parserOptions: {
  4. parser: 'babel-eslint'
  5. },
  6. env: {
  7. browser: true,
  8. },
  9. extends: [
  10. // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
  11. // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
  12. 'plugin:vue/essential',
  13. // https://github.com/standard/standard/blob/master/docs/RULES-en.md
  14. 'standard'
  15. ],
  16. // required to lint *.vue files
  17. plugins: [
  18. 'vue'
  19. ],
  20. // add your custom rules here
  21. rules: {
  22. // allow async-await
  23. 'generator-star-spacing': 'off',
  24. // allow debugger during development
  25. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  26. // 缩进风格
  27. 'indent': ['error', 2],
  28. // 空行不超过两行
  29. 'no-multiple-empty-lines': [1, {'max': 2}]
  30. }
  31. }