.eslintrc.js 781 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // http://eslint.org/docs/user-guide/configuring
  2. module.exports = {
  3. root: true,
  4. parser: 'babel-eslint',
  5. parserOptions: {
  6. sourceType: 'module'
  7. },
  8. env: {
  9. browser: false,
  10. node: true,
  11. es6: true
  12. },
  13. // https://github.com/standard/standard/blob/master/docs/RULES-en.md
  14. extends: 'standard',
  15. // required to lint *.vue files
  16. plugins: [
  17. 'html'
  18. ],
  19. // add your custom rules here
  20. 'rules': {
  21. // allow paren-less arrow functions
  22. 'arrow-parens': 0,
  23. // allow async-await
  24. 'generator-star-spacing': 0,
  25. // allow debugger during development
  26. 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
  27. },
  28. globals: {
  29. App: true,
  30. Page: true,
  31. wx: true,
  32. getApp: true,
  33. getPage: true,
  34. requirePlugin: true
  35. }
  36. }