.eslintrc.cjs 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. },
  13. // Rules order is important, please avoid shuffling them
  14. extends: [
  15. // Base ESLint recommended rules
  16. "eslint:recommended",
  17. // Uncomment any of the lines below to choose desired strictness,
  18. // but leave only one uncommented!
  19. // See https://eslint.vuejs.org/rules/#available-rules
  20. "plugin:vue/essential", // Priority A: Essential (Error Prevention)
  21. "plugin:vue/strongly-recommended", // Priority B: Strongly Recommended (Improving Readability)
  22. "plugin:vue/recommended", // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
  23. "plugin:@intlify/vue-i18n/recommended",
  24. // https://github.com/prettier/eslint-config-prettier#installation
  25. // usage with Prettier, provided by 'eslint-config-prettier'.
  26. "prettier",
  27. ],
  28. settings: {
  29. "vue-i18n": {
  30. localeDir: "./src/i18n/locales/*.json",
  31. },
  32. },
  33. plugins: [
  34. // https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
  35. // required to lint *.vue files
  36. "vue",
  37. // https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
  38. // Prettier has not been included as plugin to avoid performance impact
  39. // add it as an extension for your IDE
  40. ],
  41. globals: {
  42. ga: "readonly", // Google Analytics
  43. cordova: "readonly",
  44. __statics: "readonly",
  45. __QUASAR_SSR__: "readonly",
  46. __QUASAR_SSR_SERVER__: "readonly",
  47. __QUASAR_SSR_CLIENT__: "readonly",
  48. __QUASAR_SSR_PWA__: "readonly",
  49. process: "readonly",
  50. Capacitor: "readonly",
  51. chrome: "readonly",
  52. },
  53. // add your custom rules here
  54. rules: {
  55. "prefer-promise-reject-errors": "off",
  56. "vue/require-prop-types": "off",
  57. "vue/no-v-model-argument": "off",
  58. "vue/no-unused-vars": "warn",
  59. "vue/no-unused-components": "warn",
  60. // allow debugger during development only
  61. "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
  62. },
  63. };