.eslintrc.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. '@vue/standard'
  15. ],
  16. // required to lint *.vue files
  17. plugins: [
  18. 'vue'
  19. ],
  20. globals: {
  21. 'ga': true, // Google Analytics
  22. 'cordova': true,
  23. '__statics': true,
  24. 'process': 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': 'off',
  32. 'one-var': 'off',
  33. 'import/first': 'off',
  34. 'import/named': 'error',
  35. 'import/namespace': 'error',
  36. 'import/default': 'error',
  37. 'import/export': 'error',
  38. 'import/extensions': 'off',
  39. 'import/no-unresolved': 'off',
  40. 'import/no-extraneous-dependencies': 'off',
  41. 'prefer-promise-reject-errors': 'off',
  42. // allow console.log during development only
  43. 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  44. // allow debugger during development only
  45. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
  46. }
  47. }