.eslintrc.cjs 929 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. UniApp: true,
  18. UniHelper: true,
  19. Page: true,
  20. AnyObject: true,
  21. },
  22. parserOptions: {
  23. ecmaVersion: 'latest',
  24. },
  25. rules: {
  26. 'prettier/prettier': [
  27. 'warn',
  28. {
  29. singleQuote: true,
  30. semi: false,
  31. printWidth: 100,
  32. trailingComma: 'all',
  33. endOfLine: 'auto',
  34. },
  35. ],
  36. 'vue/multi-word-component-names': ['off'],
  37. 'vue/no-setup-props-destructure': ['off'],
  38. 'vue/no-deprecated-html-element-is': ['off'],
  39. '@typescript-eslint/no-unused-vars': ['off'],
  40. },
  41. }