eslint.config.mjs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import uniHelper from '@uni-helper/eslint-config'
  2. export default uniHelper({
  3. unocss: true,
  4. vue: true,
  5. markdown: false,
  6. ignores: [
  7. 'src/uni_modules/',
  8. 'dist',
  9. // unplugin-auto-import 生成的类型文件,每次提交都改变,所以加入这里吧,与 .gitignore 配合使用
  10. 'auto-import.d.ts',
  11. // vite-plugin-uni-pages 生成的类型文件,每次切换分支都一堆不同的,所以直接 .gitignore
  12. 'uni-pages.d.ts',
  13. // 插件生成的文件
  14. 'src/pages.json',
  15. 'src/manifest.json',
  16. // 忽略自动生成文件
  17. 'src/service/app/**',
  18. ],
  19. rules: {
  20. 'no-console': 'off',
  21. 'no-unused-vars': 'off',
  22. 'vue/no-unused-refs': 'off',
  23. 'unused-imports/no-unused-vars': 'off',
  24. 'eslint-comments/no-unlimited-disable': 'off',
  25. 'jsdoc/check-param-names': 'off',
  26. 'jsdoc/require-returns-description': 'off',
  27. 'ts/no-empty-object-type': 'off',
  28. 'no-extend-native': 'off',
  29. },
  30. formatters: {
  31. /**
  32. * Format CSS, LESS, SCSS files, also the `<style>` blocks in Vue
  33. * By default uses Prettier
  34. */
  35. css: true,
  36. /**
  37. * Format HTML files
  38. * By default uses Prettier
  39. */
  40. html: true,
  41. },
  42. })