.eslintrc.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. 'plugin:vue-pug/vue3-strongly-recommended',
  25. 'standard'
  26. ],
  27. plugins: [
  28. // https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
  29. // required to lint *.vue files
  30. 'vue'
  31. ],
  32. globals: {
  33. ga: 'readonly', // Google Analytics
  34. __statics: 'readonly',
  35. __QUASAR_SSR__: 'readonly',
  36. __QUASAR_SSR_SERVER__: 'readonly',
  37. __QUASAR_SSR_CLIENT__: 'readonly',
  38. __QUASAR_SSR_PWA__: 'readonly',
  39. process: 'readonly',
  40. APOLLO_CLIENT: 'readonly',
  41. EVENT_BUS: 'readonly'
  42. },
  43. // add your custom rules here
  44. rules: {
  45. // allow async-await
  46. 'generator-star-spacing': 'off',
  47. // allow paren-less arrow functions
  48. 'arrow-parens': 'off',
  49. 'one-var': 'off',
  50. 'no-void': 'off',
  51. 'multiline-ternary': 'off',
  52. 'import/first': 'off',
  53. 'import/named': 'error',
  54. 'import/namespace': 'error',
  55. 'import/default': 'error',
  56. 'import/export': 'error',
  57. 'import/extensions': 'off',
  58. 'import/no-unresolved': 'off',
  59. 'import/no-extraneous-dependencies': 'off',
  60. 'prefer-promise-reject-errors': 'off',
  61. 'no-unused-vars': 'off',
  62. 'vue/multi-word-component-names': 'off',
  63. // allow debugger during development only
  64. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  65. // disable bogus rules
  66. 'vue/valid-template-root': 'off',
  67. 'vue/no-parsing-error': 'off',
  68. 'vue-pug/no-parsing-error': 'off',
  69. 'vue/valid-v-for': 'off',
  70. 'vue/html-quotes': ['warn', 'single'],
  71. 'vue/max-attributes-per-line': 'off'
  72. }
  73. }