.eslintrc.js 1.2 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. 'Capacitor': true,
  26. 'chrome': true
  27. },
  28. // add your custom rules here
  29. rules: {
  30. // allow async-await
  31. 'generator-star-spacing': 'off',
  32. // allow paren-less arrow functions
  33. 'arrow-parens': 'off',
  34. 'one-var': 'off',
  35. 'import/first': 'off',
  36. 'import/named': 'error',
  37. 'import/namespace': 'error',
  38. 'import/default': 'error',
  39. 'import/export': 'error',
  40. 'import/extensions': 'off',
  41. 'import/no-unresolved': 'off',
  42. 'import/no-extraneous-dependencies': 'off',
  43. 'prefer-promise-reject-errors': 'off',
  44. // allow debugger during development only
  45. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
  46. }
  47. }