.eslintrc.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. module.exports = {
  2. extends: [
  3. 'proste/typescript',
  4. 'proste/vue',
  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/require-default-prop': 0,
  30. curly: [1, 'multi-or-nest', 'consistent'],
  31. '@typescript-eslint/indent': 0,
  32. indent: [
  33. 2,
  34. 2,
  35. {
  36. SwitchCase: 1,
  37. VariableDeclarator: {
  38. var: 2,
  39. let: 2,
  40. const: 3,
  41. },
  42. ArrayExpression: 1,
  43. ObjectExpression: 1,
  44. ImportDeclaration: 1,
  45. flatTernaryExpressions: false,
  46. },
  47. ],
  48. },
  49. overrides: [
  50. {
  51. files: ['cypress/**', 'cypress.config.ts'],
  52. plugins: ['cypress'],
  53. parserOptions: {
  54. project: './cypress/tsconfig.json',
  55. tsconfigRootDir: __dirname,
  56. warnOnUnsupportedTypeScriptVersion: true,
  57. },
  58. env: {
  59. 'cypress/globals': true,
  60. },
  61. },
  62. ],
  63. };