.eslintrc.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. module.exports = {
  2. root: true,
  3. parserOptions: {
  4. parser: 'babel-eslint',
  5. sourceType: 'module'
  6. },
  7. env: {
  8. browser: true
  9. },
  10. extends: [
  11. // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
  12. // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
  13. 'plugin:vue/essential',
  14. // https://github.com/standard/standard/blob/master/docs/RULES-en.md
  15. 'standard'
  16. ],
  17. // required to lint *.vue files
  18. plugins: [
  19. 'vue'
  20. ],
  21. globals: {
  22. 'ga': true, // Google Analytics
  23. 'cordova': true,
  24. '__statics': true
  25. },
  26. // add your custom rules here
  27. 'rules': {
  28. // allow async-await
  29. 'generator-star-spacing': 'off',
  30. // allow paren-less arrow functions
  31. 'arrow-parens': 0,
  32. 'one-var': 0,
  33. 'import/first': 0,
  34. 'import/named': 2,
  35. 'import/namespace': 2,
  36. 'import/default': 2,
  37. 'import/export': 2,
  38. 'import/extensions': 0,
  39. 'import/no-unresolved': 0,
  40. 'import/no-extraneous-dependencies': 0,
  41. // allow debugger during development
  42. 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
  43. }
  44. }