.eslintrc.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // https://eslint.org/docs/user-guide/configuring
  2. module.exports = {
  3. root: true,
  4. parserOptions: {
  5. parser: 'babel-eslint'
  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/strongly-recommended',
  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. // add your custom rules here
  22. rules: {
  23. // allow async-await
  24. 'generator-star-spacing': 'off',
  25. 'vue/name-property-casing':'off',
  26. // allow debugger during development
  27. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  28. "vue/html-self-closing": ["error", {
  29. "html": {
  30. "void": "never",
  31. "normal": "any",
  32. "component": "any"
  33. },
  34. "svg": "always",
  35. "math": "always"
  36. }]
  37. },
  38. globals: {
  39. 'echarts': true,
  40. 'AMap': true
  41. }
  42. }