.eslintrc.js 2.3 KB

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