.eslintrc.cjs 983 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* eslint-env node */
  2. require('@rushstack/eslint-patch/modern-module-resolution')
  3. module.exports = {
  4. root: true,
  5. extends: [
  6. 'plugin:vue/vue3-essential',
  7. 'eslint:recommended',
  8. '@vue/eslint-config-typescript',
  9. '@vue/eslint-config-prettier',
  10. ],
  11. // 小程序全局变量
  12. globals: {
  13. uni: true,
  14. wx: true,
  15. WechatMiniprogram: true,
  16. getCurrentPages: true,
  17. getApp: true,
  18. UniApp: true,
  19. UniHelper: true,
  20. App: true,
  21. Page: true,
  22. Component: true,
  23. AnyObject: true,
  24. },
  25. parserOptions: {
  26. ecmaVersion: 'latest',
  27. },
  28. rules: {
  29. 'prettier/prettier': [
  30. 'warn',
  31. {
  32. singleQuote: true,
  33. semi: false,
  34. printWidth: 100,
  35. trailingComma: 'all',
  36. endOfLine: 'auto',
  37. },
  38. ],
  39. 'vue/multi-word-component-names': ['off'],
  40. 'vue/no-setup-props-destructure': ['off'],
  41. 'vue/no-deprecated-html-element-is': ['off'],
  42. '@typescript-eslint/no-unused-vars': ['off'],
  43. },
  44. }