.eslintrc.cjs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. module.exports = {
  2. // https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
  3. // This option interrupts the configuration hierarchy at this file
  4. // Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
  5. root: true,
  6. parserOptions: {
  7. ecmaVersion: 2021, // Allows for the parsing of modern ECMAScript features
  8. },
  9. env: {
  10. node: true,
  11. browser: true,
  12. 'vue/setup-compiler-macros': true
  13. },
  14. // Rules order is important, please avoid shuffling them
  15. extends: [
  16. // Base ESLint recommended rules
  17. // 'eslint:recommended',
  18. // Uncomment any of the lines below to choose desired strictness,
  19. // but leave only one uncommented!
  20. // See https://eslint.vuejs.org/rules/#available-rules
  21. 'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
  22. // 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
  23. // 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
  24. // https://github.com/prettier/eslint-config-prettier#installation
  25. // usage with Prettier, provided by 'eslint-config-prettier'.
  26. 'prettier'
  27. ],
  28. plugins: [
  29. // https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
  30. // required to lint *.vue files
  31. 'vue',
  32. // https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
  33. // Prettier has not been included as plugin to avoid performance impact
  34. // add it as an extension for your IDE
  35. ],
  36. globals: {
  37. ga: 'readonly', // Google Analytics
  38. cordova: 'readonly',
  39. __statics: 'readonly',
  40. __QUASAR_SSR__: 'readonly',
  41. __QUASAR_SSR_SERVER__: 'readonly',
  42. __QUASAR_SSR_CLIENT__: 'readonly',
  43. __QUASAR_SSR_PWA__: 'readonly',
  44. process: 'readonly',
  45. Capacitor: 'readonly',
  46. chrome: 'readonly'
  47. },
  48. // add your custom rules here
  49. rules: {
  50. 'prefer-promise-reject-errors': 'off',
  51. // allow debugger during development only
  52. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
  53. }
  54. }