.eslintrc.js 658 B

12345678910111213141516171819202122232425262728
  1. module.exports = {
  2. extends: ['alloy', 'alloy/vue'],
  3. root: true,
  4. env: {
  5. // 你的环境变量(包含多个预定义的全局变量)
  6. browser: true,
  7. node: true,
  8. // mocha: true,
  9. // jest: true,
  10. // jquery: true
  11. },
  12. globals: {
  13. // 你的全局变量(设置为 false 表示它不允许被重新赋值)
  14. wx: true,
  15. },
  16. rules: {
  17. // 自定义你的规则
  18. 'no-console': 'off',
  19. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  20. 'no-invalid-this': 'off',
  21. 'vue/component-tags-order': [
  22. 'error',
  23. {
  24. order: [['template', 'script'], 'style'],
  25. },
  26. ],
  27. },
  28. }