.eslintrc.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. module.exports = {
  2. extends: [
  3. 'proste/typescript.js',
  4. 'plugin:vue/vue3-recommended',
  5. ],
  6. globals: {
  7. suite: true,
  8. test: true,
  9. describe: true,
  10. it: true,
  11. expect: true,
  12. assert: true,
  13. vitest: true,
  14. vi: true,
  15. beforeAll: true,
  16. afterAll: true,
  17. beforeEach: true,
  18. afterEach: true,
  19. },
  20. parser: 'vue-eslint-parser',
  21. parserOptions: {
  22. parser: '@typescript-eslint/parser',
  23. project: './tsconfig.json',
  24. tsconfigRootDir: '.',
  25. warnOnUnsupportedTypeScriptVersion: true,
  26. extraFileExtensions: ['.vue'],
  27. },
  28. rules: {
  29. 'vue/html-self-closing': [
  30. 2, {
  31. html: {
  32. void: 'always',
  33. normal: 'always',
  34. component: 'always',
  35. },
  36. svg: 'always',
  37. math: 'always',
  38. },
  39. ],
  40. 'vue/max-attributes-per-line': 0,
  41. 'vue/singleline-html-element-content-newline': 0,
  42. 'vue/mustache-interpolation-spacing': [1, 'never'],
  43. },
  44. overrides: [
  45. {
  46. files: ['cypress/**', 'cypress.config.ts'],
  47. plugins: ['cypress'],
  48. parserOptions: {
  49. project: './cypress/tsconfig.json',
  50. tsconfigRootDir: __dirname,
  51. warnOnUnsupportedTypeScriptVersion: true,
  52. },
  53. env: {
  54. 'cypress/globals': true,
  55. },
  56. },
  57. ],
  58. };