.eslintrc.cjs 2.2 KB

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